-
I查看全部
-
toggle(fun1,fun2),在jQuery1.8版本以后去掉了查看全部
-
不错查看全部
-
唉 我的笔记嗳查看全部
-
好东西查看全部
-
nextSibling:返回某个元素之后紧跟的元素(处于同一树层级) previousSibling:返回某节点之前紧跟的节点(处于同一树层级) parentNode 父节点查看全部
-
Xx查看全部
-
ok查看全部
-
定时展开和收起广告效果: 1.增加高度函数并循环调用函数(展开效果) function addH(){ if(h<300){ h+=5; documentt.getElementById("pn").style.height=h+"px"; }else{ return; } setTimeout("addH()",30); } 2.收起效果 function subH(){ if(h>0){ h-=5; documentt.getElementById("pn").style.height=h+"px"; }else{ documentt.getElementById("pn").style.display="none"; return; } setTimeout("subH()",30); } 3.函数调用 window.onload=function (){ addH(); setTimeout("subH()",3000); }查看全部
-
本章讲的是展开与收起的效果 var h=0; //增加高度函数addH() function addh() { if(h<300){ h+=5; document.getElementById('pn').style.hight=h+'px'; } else{ return; } setTimeout('addh()',30); } //网页加载完毕时,调用增加高度函数addH(),等待5秒钟后调用减少高度函数subh()。 window.onload=function(){ addh(); setTimeout('subh()',5000); } // 减少高度函数subH() function subh() { if(h>0){ h-=5; document.getElementById('pn').style.height=h+'px'; } else{ document.getElementById('pn').style.display='none'; return; } setTimeout('subh()',30); }查看全部
-
<a href="javascript:showdiv();" id="strHref" class="btn-slide" >展开</a>查看全部
-
function showdiv() {//展开函数 document.getElementById("hpn").; document.getElementById("strHref").innerHTML="关闭-"; document.getElementById("strHref").href="javascript:hidediv()"; } function hidediv() {//收起函数 document.getElementById("hpn").style.display="none"; document.getElementById("strHref").innerHTML="展开+"; document.getElementById("strHref").href="javascript:showdiv()"; }查看全部
-
setTimeout(code,millisec)方法用于在指定的毫秒后调用函数。查看全部
-
同一个按钮实现不同的点击功能时,需要修改引用,用element.href属性修改。查看全部
-
mark查看全部
举报
0/150
提交
取消