1.CSS继承机制;
2.getElementById,getElementsByTagName,getElementsByClassName,getAttribute,setAttribute;
3.element.childNodes element.parentNode nextSibling previousSibling childNodes firstChild lastChild
node.firstChild node.childNodes[0]
node.lastChild node.childNodes[node.childNodes.length - 1]
4.node.nodeType
元素结点的nodeType属性值是1
属性节点的nodeType属性值是2
文本节点的nodeType属性值是3
5.node.nodeValue
渐进增强 平稳退化
6.
7.
2.getElementById,getElementsByTagName,getElementsByClassName,getAttribute,setAttribute;
3.element.childNodes element.parentNode nextSibling previousSibling childNodes firstChild lastChild
node.firstChild node.childNodes[0]
node.lastChild node.childNodes[node.childNodes.length - 1]
4.node.nodeType
元素结点的nodeType属性值是1
属性节点的nodeType属性值是2
文本节点的nodeType属性值是3
5.node.nodeValue
渐进增强 平稳退化
6.
function addLoadEvent(func){
var oldonload = window.onload;
if(typeof window.onload != 'function'){
window.onload = func;
}else{
window.onload = function(){
oldonload();
func();
}
}
}
7.
document.write()
node.innerHTML="<p>I inserten</p>"
createElement
appendChild
createTextNode
parentElement.insertBefore(newElement,targetElement)