HTML DOM IFrame 对象

IFrame 对象

IFrame 对象代表一个 HTML 的内联框架。

在 HTML 文档中 <iframe> 每出现一次,一个 IFrame 对象就会被创建。

IE: Internet Explorer, F: Firefox, O: Opera, W3C: W3C 标准.

IFrame 对象的属性

属性描述IEFOW3C
align 根据周围的文字排列 iframe。619Yes
contentDocument 容纳框架的内容的文档。No19Yes
frameBorder 设置或返回是否显示 iframe 周围的边框。No19Yes
height 设置或返回 iframe 的高度。519Yes
id 设置或返回 iframe 的 id。419Yes
longDesc 设置或返回描述 iframe 内容的文档的 URL。619Yes
marginHeight 设置或返回 iframe 的顶部和底部的页空白。519Yes
marginWidth 设置或返回 iframe 的左侧和右侧的页空白。519Yes
name 设置或返回 iframe 的名称。519Yes
scrolling 设置或返回 iframe 是否可拥有滚动条。No1NoYes
src 设置或返回应载入 iframe 中的文档的 URL。519Yes
width 设置或返回 iframe 的宽度。519Yes

标准属性

属性描述IEFOW3C
className 设置或返回元素的 class 属性。519Yes
dir 设置或返回文本的方向。519Yes
lang 设置或返回元素的语言代码。519Yes
title 设置或返回元素的 title 属性。519Yes