JavaScript: The Definitive Guide
25.305. Window.onfocus: event handler invoked when a window is given focus
JavaScript 1.1:
25.305.1. Synopsis
Function onfocus
25.305.2. Description
The onfocus property of a Window specifies an event-handler function that is invoked when the window is given keyboard focus. The initial value of this property is a function that contains the semicolon-separated JavaScript statements specified by the onfocus attribute of the <body> or <frameset> tags. 25.305.3. Usage
If your web page has animation or other dynamic effects, you might use the onfocus event handler to start the animation and the onblur handler to stop it, so it runs only when the user is paying attention to the window. 25.305.4. See Also
Window.blur( ), Window.focus( ), Window.onblur; Chapter 17 |
Категории