use function to place inputs - Javascript jQuery

Javascript examples for jQuery:Form Input

Description

use function to place inputs

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials