DOM的方法和属性

创建节点:createElement();createTextNode()
复制节点:cloneNode()
插入节点:appendChild();insertBefore()
删除节点:removeChild()
替换节点:replaceChild()
设置节点属性:setAttribute()
查找节点:getAttribute();getElementById();getElementsByTagName();hasChildNodes
节点的属性:nodeName;nodeType;nodeValue
遍历节点树:childNodes;firstChild;lastChild;nextSibling;parentNode;previousSibling

posted @ 2013-12-14 16:04  11014p  阅读(169)  评论(0编辑  收藏  举报