The page
Blur event can be handled using jQuery by adding a handler to the jQuery focusout event as follows.
$(document).bind("focusout", function(event) {
// Add your code here.
});
});
Example
Note: Change the reference of the jQuery jquery-1.7.2.js files to point to your local directory.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Page
Events</title>
<script type="text/javascript"
src="JavaScript/jquery-1.7.2.js"></script>
<script type="text/javascript"
language="javascript">
$(document).ready(function() {
$(document).bind("focusout", function(event)
{
alert('Focus
out of Page');
});
});
</script>
</head>
<body>
</body>
No comments:
Post a Comment