DOM:window.onblur
From MDC
Contents |
[edit] Summary
The onblur property can be used to set the blur handler on the window, which is triggered when the window loses focus.
[edit] Syntax
window.onblur = funcRef;
-
funcRefis a reference to the function to be executed.
[edit] Example
<html>
<head>
<title>onblur test</title>
<script type="text/javascript">
window.onblur = blurText;
function blurText()
{
alert("blur event detected!");
// remove the event to stop an infinite loop!
window.onblur = '';
}
</script>
</head>
<body>
<p>click on another window
to fire the blur event for this browser window</p>
</body>
</html>
[edit] Notes
[edit] Specification
DOM Level 0. Not part of any standard.