Frame/IFrame marginWidthProperty

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

Definition and Usage

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

The marginwidth attribute specifies the left and right margins of the frame (in pixels).

Syntax

frameObject.marginWidth=pixels

or

iframeObject.marginWidth=pixels


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the marginWidth property.


Example

Example

Return the value of the marginwidth attribute:

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

Try it Yourself »


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