HTML DOM教程 25-HTML DOM IFrame 對象
1:IFrame 對象
IFrame 對象代表一個 HTML 的內聯架構。
在 HTML 文檔中 <iframe> 每出現一次,一個 IFrame 對象就會被建立。
2:IFrame 對象的屬性
| 屬性 |
描述 |
IE |
F |
O |
W3C |
| align |
根據周圍的文字流向 iframe。 |
6 |
1 |
9 |
Yes |
| contentDocument |
容納架構的內容的文檔。 |
No |
1 |
9 |
Yes |
| frameBorder |
設定或返回是否顯示 iframe 周圍的邊框。 |
No |
1 |
9 |
Yes |
| height |
設定或返回 iframe 的高度。 |
5 |
1 |
9 |
Yes |
| id |
設定或返回 iframe 的 id。 |
4 |
1 |
9 |
Yes |
| longDesc |
設定或返回描述 iframe 內容的文檔的 URL。 |
6 |
1 |
9 |
Yes |
| marginHeight |
設定或返回 iframe 的頂部和底部的頁空白。 |
5 |
1 |
9 |
Yes |
| marginWidth |
設定或返回 iframe 的左側和右側的頁空白。 |
5 |
1 |
9 |
Yes |
| name |
設定或返回 iframe 的名稱。 |
5 |
1 |
9 |
Yes |
| scrolling |
設定或返回 iframe 是否可擁有捲軸。 |
No |
1 |
No |
Yes |
| src |
設定或返回應載入 iframe 中的文檔的 URL。 |
5 |
1 |
9 |
Yes |
| width |
設定或返回 iframe 的寬度。 |
5 |
1 |
9 |
Yes |
3:Standard Properties
| Property |
Description |
IE |
F |
O |
W3C |
| className |
Sets or returns the class attribute of an element |
5 |
1 |
9 |
Yes |
| dir |
Sets or returns the direction of text |
5 |
1 |
9 |
Yes |
| lang |
Sets or returns the language code for an element |
5 |
1 |
9 |
Yes |
| title |
Sets or returns an element's advisory title |
5 |
1 |
9 |
Yes |