Skip to main content

Posts

Showing posts from March, 2016

Auto refresh div using JQuery

<script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script>         <script>         $(document).ready(function(){         setInterval(function(){         $("#set").load('refresh.php')         }, 1000);         });         </script>                  <div id="set"></div>

JQuery onclick assign val from txt to txt

<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(document).ready(function(){     $("#btn").click(function(){         $("#t").val($("#tc").val());     }); }); </script> </head> <body> <p>Name: <input type="text" id="tc" value="Raj"></p> <button id="btn" >Show Value</button> <br><br> <input type="text" id="t"> </body> </html>