Prev Demo
jQuery
>
.Blur() - Attach Blur 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> #txtBlur{ color:green; padding:10px; margin:10px; } .class{ color:green; padding:10px; margin:10px; } </style> </head> <body> <form> <input id="txtBlur" type="text" value="TechFunda"> <input type="text" value="DotNetFunda"> </form> <div> In the Above Boxes by clicking on Techfunda and then on the empty space (<span style="color:red">other than the space inside the box</span>) in the webpage you will get the alert box. </div> <script> $("#txtBlur").blur(function () { alert("blur handler called"); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output