<div class="codetitle"> <span><a style="CURSOR: pointer" data="25263" class="copybut" id="copybut25263" onclick="doCopy('code25263')"><u>复代码码</u></a></span> 代码如下:</div> <div class="codebody" id="code25263"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 전환//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br><html xmlns="http://www.w3.org/1999/xhtml"> <br><머리> <br><meta http-equiv="Content-Type" content="text/html; charset=gbk"> <br><title>测试</title> <br><meta name="author" content="ximan"> <br><meta name="keywords" content=""> <br><meta name="description" content=""> <br><link type="text/css" rel="stylesheet" href="index.css"> <br></head> <br><본문> <br><div class="content"> <br><ul id="num"> <br><li style="배경: #f00;"> <br></li> <br><li> <br></li> <br><li> <br></li> <br><li> <br></li> <br><li> <br></li> <br></ul> <br><ul id="img_box"> <br><li> <br><a href="#"> <br><img src="pailabi_shop1.jpg" alt="哈哈哈" /> <br></a> <br></li> <br><li> <br><a href="#"> <br><img src="pailabi_shop2.jpg" alt="哈哈哈" /> <br></a> <br></li> <br><li> <br><a href="#"> <br><img src="paila_shop3.jpg" alt="哈哈哈" /> <br></a> <br></li> <br><li> <br><a href="#"> <br><img src="paila_shop4.jpg" alt="哈哈哈" /> <br></a> <br></li> <br><li> <br><a href="#"> <br><img src="paila_shop5.jpg" alt="哈哈哈" /> <br></a> <br></li> <br></ul> <br></div> <br><script type="text/javascript"> <br></script> <br><script type="text/javascript"> <br>window.onload=function (){ <br>var num = document.getElementById("num"); <br>var num_li = document.getElementById("num").getElementsByTagName("li"); <br>var img_box = document.getElementById("img_box"); <br>var img_box_li = document.getElementById("img_box").getElementsByTagName("li"); <br>var blw = img_box_li[0].offsetWidth; <br>var n = 0; <br>img_box.style.left = 0 <br>var autoscroll = setInterval(auto,3000); <br>for (var i = 0;i < num_li.length;i ){ <br>num_li[i].onmouseover = function(){ <br>clearInterval(autoscroll); <br>for (var i = 0;i < num_li.length;i ){ <br>num_li[i].style.Background = ""; <br>if(num_li[i]==this){ <br>this.style.Background = "#f00"; <br>슬라이드(i); <br>} <br>} <br>} <br>num_li[i].onmouseout = function(){ <br>for (var i = 0;i < num_li.length;i ){ <br>if (num_li[i]==this){ <br>n = i; <br>autoscroll = setInterval(auto,3000) <br>} <br>} <br>} <br>} <br>function Slide(i){ <br>img_box.style.left = -bliw*i " px"; <br>} <br>function auto(){ <br>n ; <br>if(n == img_box_li.length){ <br>n =0; <br>} <br>for (var i =0;i < num_li.length;i ){ <br>num_li[i].style.Background = ""; <br>} <br>num_li[n].style.Background = "#f00"; <br>슬라이드(n); <br>} <br>} <br></script> <br></body> <br></html> <br> </div>