DOM不同的结点类型

1)node类型

nodeName(what node) and nodeValue(always null)

node父子之间可以用childNodes来表示 firstChild,childNodes[a],lastChild

兄弟结点,可以用nextsiBiling,previousSibling

在什么点前面插入地加  a.insertBefore(c,b);

node的替换a.replaceChild(c,b);

node的移除a.remove(b)

克隆cloneNode(),里面有一布尔值,是否进行深复制

2)document

nodeName=#document 

nodeValue=9

document.title取得题目

document.body

document.documentElement//整个html元素

document.doctype

document.URL

document.forms

document.images

document.getElementById()

document.getElementByTagName()

document.getElementByname()

document.write()

posted on 2016-09-07 23:01  Kooing  阅读(131)  评论(0编辑  收藏  举报

导航