Frame/IFrame marginHeightProperty

Frame/IFrame 对象参考手册Frame/IFrame Object

Definition and Usage

The marginHeight property sets or returns the value of the marginHeight attribute in a frame/iframe element.

The marginheight attribute sets the top and bottom margins of a frame (in pixels).

Syntax

frameObject.marginHeight=pixels

or

iframeObject.marginHeight=pixels


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the marginHeight property.


Examples

Examples

Return the value of the marginheight attribute:

document.write(document.getElementById("myframe").marginHeight);

Try it yourself »


Frame/IFrame 对象参考手册Frame/IFrame Object Other Extensions