<iframe>
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.
Attribute | Description | W3C |
---|---|---|
align | Arrange iframes according to the surrounding text. | Yes |
contentDocument | The document that holds the contents of the frame. Returns a document object generated by frame/iframe. | Yes |
contentWindow | Returns the window object generated by frame/iframe. | No |
frameBorder | Sets or returns whether to display the border around the frame. | Yes |
height | Sets or returns the height of the iframe. | Yes |
longDesc | Sets or returns a URL to a document that contains a description of the frame's content. | Yes |
marginHeight | Sets or returns the page white space at the top and bottom of the iframe. | Yes |
marginWidth | Sets or returns page white space to the left and right of the frame/iframe. | Yes |
name | Sets or returns the name of the frame/iframe. | Yes |
noResize | Sets or returns whether the frame is resizable. | Yes |
scrolling | Sets or returns whether a frame can have scroll bars. | Yes |
src | Sets or returns the URL of a document that should be loaded into the frame. | Yes |
width | Sets or returns the width of the iframe. | Yes |
Frame/IFrame object events
Event | Description | W3C |
---|---|---|
onload | Execute the script as soon as the framework loads. | Yes |
Standard Properties and Events
Frame/IFrame objects also support standard properties and events .