<div id="demo" style="overflow: hidden; width: 300px; height: 120px; background-color:#00cc66;">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td id="demo1" nowrap="nowrap">
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
</td>
<td id="demo2" nowrap="nowrap"></td>
</tr>
</tbody>
</table>
</div>
<script language="javascript">
var speed = 20
function Marquee()
{
if(demo2.offsetWidth-demo.scrollLeft<=0)
{
demo.scrollLeft -= demo1.offsetWidth
}
else
{
demo.scrollLeft ++
}
}
//demo.onmouseover = function(){clearInterval(MyMar)}
demo.onmouseout = function(){MyMar = setInterval(Marquee,speed)}
window.onload = function()
{
if(demo.offsetWidth < demo1.offsetWidth)
{
demo2.innerHTML=demo1.innerHTML
var MyMar=setInterval(Marquee,speed)
}
}
</SCRIPT>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td id="demo1" nowrap="nowrap">
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
<img src="http://image2.sina.com.cn/home/images/sina_logo2.gif" />
</td>
<td id="demo2" nowrap="nowrap"></td>
</tr>
</tbody>
</table>
</div>
<script language="javascript">
var speed = 20
function Marquee()
{
if(demo2.offsetWidth-demo.scrollLeft<=0)
{
demo.scrollLeft -= demo1.offsetWidth
}
else
{
demo.scrollLeft ++
}
}
//demo.onmouseover = function(){clearInterval(MyMar)}
demo.onmouseout = function(){MyMar = setInterval(Marquee,speed)}
window.onload = function()
{
if(demo.offsetWidth < demo1.offsetWidth)
{
demo2.innerHTML=demo1.innerHTML
var MyMar=setInterval(Marquee,speed)
}
}
</SCRIPT>