Auto type into form with jquery - Javascript jQuery

Javascript examples for jQuery:Form Input

Description

Auto type into form with jquery

Demo Code

ResultView the demo in separate window


<html>
   <head> 
      <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script> 
   </head> 
   <body> 
      <input type="text" class="form-control" id="lookup" placeholder=" Start typing:"> 
      <input type="text"> 
      <script>
$(document).keydown(function() {
  var $focused = $('input:focus');
  if (!$focused.length) {//from   w  w w  .  j  a  va 2s .  co  m
    $('#lookup').focus();
  }
});

      </script>  
   </body>
</html>

Related Tutorials