HTML and CSS Reference
In-Depth Information
Because frames are just little windows, they share many of the same properties and
methods of the window object. See Table 10.11 for a list of properties and Table 10.12
for a list of methods.
Table 10.11 Properties of the frame Object
Property
What It Describes
document
The document currently loaded in the frame.
frames
An array of frames.
length
The number of elements in the frames array; that is, the number of frames.
name
The name of the frame assigned to the HTML name attribute.
parent
The main window from which the child frames are defined.
self
The current frame.
top
The window that started the script.
window
The current window or frame.
Table 10.12 Methods of the frame Object
Method
What It Does
blur()
Removes focus from the frame.
clearInterval()
Clears a timed interval.
clearTimeout()
Clears a timeout.
focus()
Puts focus into the frame.
print()
Invokes a print dialog box.
setInterval()
Sets a timed interval.
setTimeout()
Sets a timeout.
unwatch()
Unsets the watchpoint.
watch()
Sets a watchpoint on a frame property; if a property changes, calls a function.
Creating Menus and Navigation Bars. Because frames can be used to divide a
page, it is common to use one of the frames as a menu of items and the other as the main
page where a page is loaded depending on the user's selection. If one frame contains a
 
Search WWH ::




Custom Search