put focus on a textbox? - Javascript jQuery

Javascript examples for jQuery:Form Text Input

Description

put focus on a textbox?

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.8.3.js"></script> 
   </head> 
   <body> 
      <input type="text" class="focus"> 
      <script type="text/javascript">

$(".focus").focus();

      </script>  
   </body>//from ww  w  .j  av a 2  s .  c om
</html>

Related Tutorials