var c=document.getElementsByTagName("li");? ? for(var i=0;i<c.length;i++){? ? var a=c[i].nodeName;? ? var b=c[i].nodeValue;? ? var d=c[i].nodeType;? ? // document.write(a+"<br>"+b+"<br>"+d+"<br>");? ? document.write(a+"<br>");? ? document.write(b+"<br>");? ? document.write(c+"<br>");? ? }輸出結(jié)果:LInull[object HTMLCollection]LInull[object HTMLCollection]LInull[object HTMLCollection]
[object HTMLCollection] 類型顯示這個是啥意思
慕粉0943041209
2017-04-18 21:48:31