HTML DOM FrameandIFrameObject
Frame Object
The Frame object represents an HTML frame.
The <frame> tag defines a specific window (frame) within a frameset.
Each time a <frame> appears in an HTML document, a Frame object is created.
IFrame Object
The IFrame object represents an HTML inline frame.
The <iframe> tag defines an inline frame that contains another document.
Each time an <iframe> appears in an HTML document, an IFrame object is created.
Frame/IFrame Object Properties
W3C:W3C Standard.
| Property | Description | W3C |
|---|---|---|
| align | Aligns the iframe according to the surrounding text. | Yes |
| contentDocument | The document that contains the content of the frame. Returns the document object generated by the frame/iframe. | Yes |
| contentWindow | Returns the window object generated by the 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 the URL of the document that describes the contents of the frame. | Yes |
| marginHeight | Sets or returns the top and bottom margins of the iframe. | Yes |
| marginWidth | Sets or returns the left and right margins of the frame/iframe. | Yes |
| name | Sets or returns the name of the frame/iframe. | Yes |
| noResize | Sets or returns whether the frame can be resized. | Yes |
| scrolling | Sets or returns whether the frame can have scrollbars. | Yes |
| src | Sets or returns the URL of the document to be loaded into the frame. | Yes |
| width | Sets or returns the width of the iframe. | Yes |
Frame/IFrame Object Events
| Event | Description | W3C |
|---|---|---|
| onload | Executes a script immediately after the frame is loaded. | Yes |
Standard Properties and Events
Frame/IFrame objects also support standardpropertiesandevents。
Other Extensions