Prev Demo
jQuery
>
.Focusout() - Attach Focus Out Event
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <style> #txtFocusOut, #txtFocusOut1 { background-color:pink; padding:5px; } </style> </head> <body> USER :   <input type="text" name="user" id="txtFocusOut"/><br /> PASSWORD : <input type="password" name="password" id="txtFocusOut1"/> <br/> <br/> <p>Keep the curser inside the text box and then out side, then you will get the alert.</p> <script> $("#txtFocusOut, #txtFocusOut1").focusout(function () { alert("got focus out"); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output