當前位置:編程學習大全網 - 網站源碼 - HTML關於輪播圖代碼

HTML關於輪播圖代碼

<div?id="demo">

<table?border=0?align=center?cellpadding=1?cellspacing=1?cellspace=0?style="margin:0;?padding:0"?>

<tr>

<td?valign=top?bgcolor=ffffff?id=marquePic1>

<table?width='100%'?border='0'?cellspacing='0'>

<tr>

<td?align=center><a?href='#'><img?src="images/zs001.png"?width=300?height=180?border=0><br><br></a></td>

<td?align=center><a?href='#'><img?src="images/zs001.png"?width=300?height=180?border=0><br><br></a></td>

</tr>

</table>

</td>

<td?id=marquePic2?valign=top></td>

</tr>

</table>

</div>

<script?type="text/javascript">

var?speed=20

marquePic2.innerHTML=marquePic1.innerHTML

function?Marquee(){

if(demo.scrollLeft>=marquePic1.scrollWidth){

demo.scrollLeft=0

}

else

{

demo.scrollLeft++

}

}

var?MyMar=setInterval(Marquee,speed)

demo.onmouseover=function()?{clearInterval(MyMar)}

demo.onmouseout=function()?{MyMar=setInterval(Marquee,speed)}

</script>

.demo{?width:100%;?height:auto;?margin:auto;?text-align:center;}

#demo{width:1180px;?height:180px;?overflow:hidden;clear:both;?margin:auto}

  • 上一篇:java 中webservice中怎麽用xml傳輸數據
  • 下一篇:珠海哪裏可以買土雞
  • copyright 2024編程學習大全網