Blur event

by fido3993

HTML

Enter your name: <input type="text">
<h3>
Write something in the input field, and then click outside the field to lose focus(blur).
</h3>

JavaScript

$(document).ready(function() {
$("input").blur(function() {
	alert("This input field has lost its focus.")
});
});