document -- - > HTMLDocument. prototype -- - > Document. prototype
Element. prototype. Mychildren = function ( ) {
var child = this . childNodes;
var len = child. length;
var arr = [ ] ;
for ( var i = 0 ; i < len; i ++ ) {
if ( child[ i] . NodeType == 1 ) {
arr. push ( child[ i] ) ;
}
}
return arr;
}
function retSibling ( e, n) {
while ( e && n) {
if ( n > 0 ) {
if ( e. nextElementSibling) {
e = e. nextElementSibling;
} else {
for ( e = e. nextSibling; e && e. nodeType != 1 ; e = e. nextSibling)
}
n-- ;
} else {
if ( e. perviousElementSibling) {
e = e. perviousElementSibling;
} else {
for ( e = e. perviousSibling; e && e. nodeType != 1 ; e = e. perviousSibling)
}
n++ ;
}
return e;
}
document. createElement ( '' ) ;
ducument. createComment ( '' ) ;
ducument. createTextNode ( ) ;
ducument. createDocumentFragment ( ) ;
parentNode. appendChild ( ) ;
parentNode. insertBefore ( a, b) ;
parent. removeChild ( ) ;
child. remove ( ) ;
parent. replaceChild ( newdata, origindata) ;
div. innerHTML =
div. innnerText =
div. setAttribute ( 'id' , 'only' ) ;
div. getAttribute ( 'id' )