Javascript examples for jQuery:Form Text Input
Jquery function when a textbox loses focus
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.2.js"></script> <script type="text/javascript"> $(function(){/*from ww w.ja v a2s . c o m*/ $('#text1, #textarea1').focusout(function() { console.log(this.id + " focus out"); }); }); </script> </head> <body> <form> <input type="text" id="text1"> <textarea id="textarea1"></textarea> </form> </body> </html>