Javascript examples for jQuery:Form Input
use function to place inputs
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.js"></script> <script type="text/javascript"> $(window).load(function(){// w w w .j a v a 2 s. co m $("#submit").click(function() { $("#text").val("new text"); }); }); </script> </head> <body> <input id="text" type="text" value="hola"> <input id="submit" type="submit"> </body> </html>