- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>防腾讯网的JS图片切换代码 - www.webdm.cn</title>
- <STYLE type=text/css>
- body{margin: 0px;}
- A {COLOR: #313131;font-size: 9pt; TEXT-DECORATION: none}
- A:hover {COLOR: #d7000f; TEXT-DECORATION: underline}
- </STYLE>
- </head>
- <body>
- <table width="389" border="0" cellspacing="0" cellpadding="0" class="mt13">
- <tr>
- <td height="339" background="http://www.webdm.cn/p_w_picpaths/20100104/focus_bg.jpg"><!--focus-->
- <style type="text/css">
- .dis{display:block}
- .undis{display:none}
- .npim{border:#000 1px solid;}
- .npim1 img{border:#E5E5E5 3px solid}
- .nptx3{padding-left:207px;}
- .nptx3 div{width:21px; line-height:20px; text-align:center; margin-left:3px; float:left;cursor:pointer;}
- .npfd1{background:url("http://www.webdm.cn/p_w_picpaths/20100104/f_num_on.gif") no-repeat;}
- .npfd1 a,.npfd1 a:hover{color:#fff;text-decoration:none;}/* www.codefans.net */
- .npfd2{background:url("http://www.webdm.cn/p_w_picpaths/20100104/f_num.gif") no-repeat;}
- </style>
- <div style="width:376px; height:300px; filter:progid:DXImagetransform.Microsoft.GradientWipe(duration=5,gradientSize=0.5,motion=forward ); margin:6px auto 0" id="fc">
- <!--周一-->
- <table width="376" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td class="npim"><a href="/" target="_blank" ><img src="http://www.webdm.cn/p_w_picpaths/wall1.jpg" width="374" height="300" border="0" /></a></td>
- </tr>
- </table>
- <!--周二-->
- <table width="378" border="0" align="center" cellpadding="0" cellspacing="0" class="undis">
- <tr>
- <td class="npim"><a href="/" target="_blank" ><img src="http://www.webdm.cn/p_w_picpaths/wall2.jpg" width="374" height="300" border="0" /></a></td>
- </tr>
- </table>
- <!--周三-->
- <table width="378" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td class="npim"><a href="/" target="_blank"><img src="http://www.webdm.cn/p_w_picpaths/wall3.jpg" width="374" height="300" border="0" /></a></td>
- </tr>
- </table>
- <!--周四 -->
- <table width="378" border="0" align="center" cellpadding="0" cellspacing="0" class="undis">
- <tr>
- <td class="npim"><a href="/" target="_blank" ><img src="http://www.webdm.cn/p_w_picpaths/wall4.jpg" width="374" height="300" border="0" /></a></td>
- </tr>
- </table>
- <!--周五-->
- <table width="378" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td class="npim"><a href="/" target="_blank" ><img src="http://www.webdm.cn/p_w_picpaths/wall5.jpg" width="374" height="300" border="0" /></a></td>
- </tr>
- </table>
- <!--周六-->
- <table width="378" border="0" align="center" cellpadding="0" cellspacing="0" class="undis">
- <tr>
- <td class="npim"><a href="/" target="_blank" ><img src="http://www.webdm.cn/p_w_picpaths/wall6.jpg" width="374" height="300" border="0" /></a></td>
- </tr>
- </table>
- <!--周日-->
- <table width="378" border="0" align="center" cellpadding="0" cellspacing="0" class="undis">
- <tr>
- <td class="npim"><a href="/" target="_blank" ><img src="http://www.webdm.cn/p_w_picpaths/wall7.jpg" width="374" height="300" border="0" /></a></td>
- </tr>
- </table>
- </div>
- <table width="378" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td height="3"></td>
- </tr>
- <tr>
- <td class="nptx3" id="num"><div class="npfd1" onmouseover="Mea(0);clearAuto();" onmouseout="setAuto()"><a href="http://www.webdm.cn" target="_blank">1</a></div>
- <div class="npfd2" onmouseover="Mea(1);clearAuto();" onmouseout="setAuto()"><a href="/" target="_blank">2</a></div>
- <div class="npfd2" onmouseover="Mea(2);clearAuto();" onmouseout="setAuto()"><a href="/" target="_blank">3</a></div>
- <div class="npfd2" onmouseover="Mea(3);clearAuto();" onmouseout="setAuto()"><a href="/" target="_blank">4</a></div>
- <div class="npfd2" onmouseover="Mea(4);clearAuto();" onmouseout="setAuto()"><a href="/" target="_blank">5</a></div>
- <div class="npfd2" onmouseover="Mea(5);clearAuto();" onmouseout="setAuto()"><a href="/" target="_blank">6</a></div>
- <div class="npfd2" onmouseover="Mea(6);clearAuto();" onmouseout="setAuto()"><a href="/" target="_blank">7</a></div></td>
- </tr>
- </table>
- <script>
- var n=0;
- var showNum = document.getElementById("num");
- var fc = document.getElementById("fc");
- var week = new Date().getDay();
- if(week)
- { weekweek=week-1;}
- else
- {
- week=6;
- }
- ;
- function Mea(value){
- n=value;
- setBg(value);
- plays(value);
- }
- function setBg(value){
- for(var i=0;i<7;i++)
- if(value==i){
- showNum.getElementsByTagName("div")[i].className='npfd1';
- }
- else{
- showNum.getElementsByTagName("div")[i].className='npfd2';
- }
- }
- function plays(value){
- with (fc){
- filters[0].Apply();
- for(i=0;i<7;i++)i==value?getElementsByTagName("table")[i].className="dis":getElementsByTagName("table")[i].className="undis";
- filters[0].play();
- }
- }
- var first='';
- var autoStart='';
- function clearAuto(){clearInterval(autoStart);}
- function setAuto(){
- clearInterval(first);
- autoStart=setInterval("auto(n)", 5000)
- }
- function auto(value){
- n++;
- if(n>6)n=0;
- Mea(n);
- }
- first=setInterval("setAuto()", 5000);
- Mea(week);
- </script>
- <!--focus end-->
- </td>
- </tr>
- </table>
- </body>
- </html>
- <br />
- <a href="http://www.webdm.cn">网页代码站</a> - 最专业的代码下载网站 - 致力为中国站长提供有质量的代码!