August 1999
Intermediate to advanced
1488 pages
72h 53m
English
onFocus="command"
The onFocus event handler is used to specify when the focus is brought to a frame. The user can set the focus by either pressing the mouse button or by using the Tab key.
The syntax for accessing the onFocus event handler is shown in Listing 7.278. When the focus is set on the top frame, an alert box is displayed.
<html>
<title> Example of onFocus event handler of the Frame object</title>
<frameset rows="80, *">
<frame src=top.html name=top onFocus='alert("You are now in the top frame")'>
<frame src=bottom.html name=bottom>
</frameset>
</html>
|
Read now
Unlock full access