25.305. Window.onfocus: event handler invoked when a window is given focusJavaScript 1.1:25.305.1. SynopsisFunction onfocus 25.305.2. DescriptionThe 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. UsageIf 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 AlsoWindow.blur( ), Window.focus( ), Window.onblur; Chapter 17 |