HTML DOM Frame and IFrame objects

Frame object

The Frame object represents an HTML frame.

The <frame> tag defines a specific window (frame) within the frame.

A Frame object is created each time <frame> appears in an HTML document.

IFrame object

An IFrame object represents an HTML iframe.

The <iframe> tag defines an iframe that contains another document.

An IFrame object is created each time an <iframe> appears in an HTML document.

Frame/IFrame object attributes

W3C: W3C standard.

alignArrange iframes according to the surrounding text.Yes
contentDocumentThe document that holds the contents of the frame. Returns a document object generated by frame/iframe.Yes
contentWindowReturns the window object generated by frame/iframe.No
frameBorderSets or returns whether to display the border around the frame.Yes
heightSets or returns the height of the iframe.Yes
longDescSets or returns a URL to a document that contains a description of the frame's content.Yes
marginHeightSets or returns the page white space at the top and bottom of the iframe.Yes
marginWidthSets or returns page white space to the left and right of the frame/iframe.Yes
nameSets or returns the name of the frame/iframe.Yes
noResizeSets or returns whether the frame is resizable.Yes
scrollingSets or returns whether a frame can have scroll bars.Yes
srcSets or returns the URL of a document that should be loaded into the frame.Yes
widthSets or returns the width of the iframe.Yes

Frame/IFrame object events

onloadExecute the script as soon as the framework loads.Yes

Standard Properties and Events

Frame/IFrame objects also support standard properties and events .