Language References
Defines the contents and appearance of a frame. | HTML 4, 4.01. Deprecated |
HTML Syntax
<frame
bordercolor = color
class = classname
datafld = colname
datasrc = #id
frameborder = no | yes | 0 | 1
height = n
id = value
marginheight = pixels
marginwidth = pixels
name = window_name | _blank | _parent | _self | _top
noresize = noresize | resize
scrolling = auto | no | yes
src = url
title = text
width = n
event = script
>
The FRAME element is used to create a single, independent region of the Web browser window. A FRAME functions like a window within a window.
The FRAME element can only be used within a FRAMESET element, that acts as the container for the individual FRAMEs.
Each FRAME can display a distinct HTML document. The element’s src attribute specifies the initial document the FRAME will contain.
Each FRAME is normally assigned a name to identify and reference the frame. This name may be used as the target of subsequent links.
Authors can also specify the appearance of a FRAME, using the element’s rendering attributes.
DIV Members
The following example divides the main browser window into two FRAMEs.
<frameset rows="15%,*">
<frame src="contents_of_frame1.html" name="frame1">
<frame src="contents_of_frame2.html" name="frame2">
</frameset>
An object that is in another FRAME of the same FRAMESET can be accesed using the following notation:
parent.frames.frameName.frameObjID.property
For example, if a page is in a frame ( frame1 ), the following demonstrates how to reference the innerText property of an object with id=frameObjID
in a different frame ( frame2 ) of the same frameset.
parent.frames.frame2.frameObjID.innerText
FRAMESET IFRAME frames, Using Frames and Framesets