滑动鼠标切换内容效果代码
<P><script><BR>function doClick_down(o){<BR> o.className="down_current";<BR> var j;<BR> var id;<BR> var e;<BR> for(var i=1;i<=4;i++){<BR> id="down"+i;<BR> j=document.getElementById(id);<BR> e=document.getElementById("d_con"+i);<BR> if(id!=o.id){<BR> j.className="down_link";<BR> e.style.display="none";<BR> }<BR> else{<BR> e.style.display="block";<BR> }<BR> }<BR> }<BR></script><BR><li><span class="down_current" id="down1" onmouseover="javascript:doClick_down(this)"><a target="_blank" href="123.asp">ASP源码</a></span></li><BR><li><span class="down_link" id="down2" onmouseover="javascript:doClick_down(this)"><a target="_blank" href="123.asp">NET源码</a></span></li><BR><li><span class="down_link" id="down3" onmouseover="javascript:doClick_down(this)"><a target="_blank" href="123.asp">PHP源码</a></span></li><BR><li><span class="down_link" id="down4" onmouseover="javascript:doClick_down(this)"><a target="_blank" href="123.asp">常用软件</a></span></li><BR><div id=d_con1>11111111111</div><BR><div id=d_con2 style='display:none'>22222222222</div><BR><div id=d_con3 style='display:none'>33333333333</div><BR><div id=d_con4 style='display:none'>44444444444</div></P><P>复制上面代码到网页相应位置即可看到滑动鼠标后内容切换的效果!</P>
页:
[1]