var content=document.getElementsByClassName("content");
for(var i=0;i<content.length;i++){
var z=content[i].previousSibling;
if(z.nodeType!=1){
z=z.previousSibling;
}
z.style.display="block";
content[i].style.display="none";
}
在showdiv函数中加入以上代码
for(var i=0;i<content.length;i++){
var z=content[i].previousSibling;
if(z.nodeType!=1){
z=z.previousSibling;
}
z.style.display="block";
content[i].style.display="none";
}
在showdiv函数中加入以上代码
最新回答 / bequite
window.onload=function(){ aa = setInterval("addH()",30) } var h=0; function addH(){ if(h<300){ h+=5; document.getElementById('pn').style.height=h+'px'; }else{ clearInterval(aa); setTimeout(subH,5000); }...
2015-11-14
最赞回答 / 慕粉3835875
var hpn=document.getElementById("hpn");var strHref=document.getElementById("strHref");strHref.onclick=function () { if (hpn.style.display == "none"){ hpn.style.display = "block" strHref.innerHTML="收起"; }else { hpn.style.display ...
2015-11-12