HTML DOM Section 對象

Section 對象

Section 對象代表 HTML <section> 元素。

注釋:Internet Explorer 8 以及更早的版本不支持 <section> 元素。

訪問 Section 對象

您可使用 getElementById() 來訪問 <section> 元素:

var x = document.getElementById("mySection");

親自試一試

創建 Section 對象

您可使用 document.createElement() 方法來創建 <section> 元素:

var x = document.createElement("SECTION");

親自試一試

標準屬性和事件

Section 對象支持標準屬性事件

相關頁面

HTML 參考手冊:HTML <section> 標簽