Latest web development tutorials

HTML DOM Frame and IFrame objects

Frame object

Frame object represents an HTML frame.

<Frame> tag defines a specific window in the frame (frame).

In an HTML document <frame> Every once, it will create a Frame object.


IFrame objects

IFrame object represents an inline frame of HTML.

<Iframe> tag defines an inline frame that contains another document.

In an HTML document <iframe> Each occurrence, an IFrame object is created.


Frame / IFrame object properties

W3C: W3C standards.

属性 描述 W3C
align 根据周围的文字排列 iframe。 Yes
contentDocument 容纳框架的内容的文档。返回 frame/iframe 生成的文档对象。 Yes
contentWindow 返回 frame/iframe 生成的 window 对象。 No
frameBorder 设置或返回是否显示框架周围的边框。 Yes
height 设置或返回 iframe 的高度。 Yes
longDesc 设置或返回指向包含框架内容描述文档的 URL。 Yes
marginHeight 设置或返回 iframe 的顶部和底部的页空白。 Yes
marginWidth 设置或返回 frame/iframe 的左侧和右侧的页空白。 Yes
name 设置或返回 frame/iframe 的名称。 Yes
noResize 设置或返回框架是否可调整大小。 Yes
scrolling 设置或返回框架是否可拥有滚动条。 Yes
src 设置或返回应被加载到框架中的文档的 URL。 Yes
width 设置或返回 iframe 的宽度。 Yes

Frame / IFrame object events

event description W3C
onload When the frame loaded script execution immediately. Yes

Standard properties and events

Frame / IFrame objects also supports the standard attributes and events .