为什么我这样写没有效果?
window.onload=function(){
var hpn= document.getElementById("hpn");
var strHref=document.getElementById("strHref");
function showdiv(){
hpn.style.display = "block";
strHref.href = "javascript:hidediv();";
strHref.innerHTML = "收起-";
}
function hidediv(){
hpn.style.display = "none";
strHref.href = "javascript:showdiv();";
strHref.innerHTML = "展开+";
}
}