Input text box focus on blur event - Javascript jQuery

Javascript examples for jQuery:Form Text Input

Description

Input text box focus on blur event

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.2.min.js">

      </script> 
      <script type="text/javascript">
$( document ).ready(function() {
$(document).on('blur', "#setFocus", function (e) {
  $(this).focus();/*from w w w  . ja  v  a  2 s  .c  o  m*/
});
});

      </script> 
   </head> 
   <body> 
      <input type="text" id="setFocus"> 
      <input type="text" id="set">  
   </body>
</html>

Related Tutorials