Javascript examples for jQuery:Form Input
Auto type into form with jquery
<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>