一.HMTL DOM對象 ——方法和屬性
1.1常用的方法.
1.getElementByld( id )方法 ——獲取帶有指定id 的節點( 元素 )
2.appendChild( node )方法 ——插入新的子節點( 元素 )
3.removeChild ( node )方法 ——刪除子節點 ( 元素 )
4.getElementByTagName()方法 ——返回帶有指定標簽名的所有元素
5.getElementsByClassName() 方法——如果您希望查找帶有相同類名的所有 HTML 元素,請使用這個方法。
1.2常用的屬性.
1. innerHTNL ——節點( 元素 )的文本屬性
2. parentNode——節點( 元素 )的父節點
3. childNodes——節點( 元素 )的子節點
4.attributes ——節點( 元素 )的屬性節點