HTML DOM Section 对象

Section 对象

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

访问 Section 对象

您可以使用 getElementById() 访问 <section> 元素:

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

亲自试一试

创建 Section 对象

您可以使用 document.createElement() 创建 <section> 元素:

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

亲自试一试

标准属性和事件

Section 对象支持标准属性事件