圖片跑馬

語法如下:

<div id="pic" style="OVERFLOW: hidden; width:1024">
<table width="100%" border=0 cellpadding=0 bgcolor="" cellspace=0>
<tr>
<td id="pic1">
<table>
<tr>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
<td><a rel="nofollow" href="點擊圖片會連結到" target=_blank><img src="圖片連結.jpg" height="150" border=0></td>
</tr>
</table>
</td>
<td id="pic2"></td>
</tr>
<script>
var speed=30
pic2.innerHTML=pic1.innerHTML
pic.scrollLeft=pic.scrollWidth
function Marquee(){
if(pic.scrollLeft<=0)
pic.scrollLeft+=pic2.offsetWidth
else{
pic.scrollLeft--
}
}
var MyMar=setInterval(Marquee,speed)
pic.onmouseover=function() {clearInterval(MyMar)}
pic.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
</table>
</div>


範例呈現: