JavaScript DHTML/jQuery/blur
blur(fn): blur event fires when an element loses focus
<source lang="html4strict">
To pop up an alert every time any paragraph"s blur event triggers:
$("p").blur( function () { alert("Hello World!"); } );
</source>
Stop people from writing in text input boxes
<source lang="html4strict">
<html>
<head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("input").focus(function () { $(this).blur(); }); }); </script> </head> <body> <body>
<input type="text" /> focus event fire
</body>
</html>
</source>
To triggers the blur event on all paragraphs:
<source lang="html4strict">
$("p").blur();
</source>