function showPic(whichpic){
var source=whichpic.getAttribute("href");
var placeholder=document.getElementById("placeholder");
placeholder.setAttribute("src",source);
}
function count()
{
var body=document.getElementByTagName("body")[0];
alert(body.childNodes.length);
alert("hi");
}
window.onload=count;用ie9,firefox。safari都不行,代码错了吗??
------解决方案--------------------
document.getElementsByTagName("body")[0]啦