asp.net.ph

Skip Navigation Links

FRAME Element | FRAME Object

Language References


Defines the contents and appearance of a frame.HTML 4, 4.01. Deprecated

HTML Syntax

Remarks

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.

Members

DIV Members

Example

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>
Notes on DOM Access

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
See Also

FRAMESET   IFRAME   frames, Using Frames and Framesets



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note