August 1999
Intermediate to advanced
1488 pages
72h 53m
English
onFocus="command"
The onFocus event handler is defined in an <input> tag and specifies what to do when the button gains focus.
The code in Listing 7.30 uses the onFocus event handler to display an alert box any time the button gains focus.
<html>
<form name="myForm">
<input type="button"
value="Big Button"
name="myButton"
onFocus="alert('Focus event occured')">
</form>
</html>
|
Read now
Unlock full access