回复 5楼 孤独冷雨
孤独大哥,感谢您,不过很可惜您的代码运行不了啊,从您的代码来看,应该是一个从数据库里读新闻的模块吧?一是我没有数据库,二是我没太看懂中间的一些代码,不过,仍然感谢您,至少最后的<script>...</script>用上了,下面这个能执行了:
<table
width=700
border=0 align="center"
cellpadding=0
cellspacing=0>
<tr>
<td><div
id=demo
style=overflow:hidden;height:126;width:700;color:#ffffff>
<table
align=left
cellpadding=0
cellspace=0
border=0>
<tr>
<td
id=demo1
valign=top><table
border=0
cellpadding=0
cellspacing=0>
<tr>
<td><img
src=images/logo1.jpg
width=150
height=100
class=b5
hspace=10
vspace=4></td>
<td
width=10></td>
<td><img
src=images/logo1.jpg
width=150
height=100
class=b5
hspace=10
vspace=4></td>
<td
width=10></td>
<td><img
src=images/logo1.jpg
width=150
height=100
class=b5
hspace=10
vspace=4></td>
<td
width=10></td>
<td><img
src=images/logo1.jpg
width=150
height=100
class=b5
hspace=10
vspace=4></td>
<td
width=10></td>
<td><img
src=images/logo1.jpg
width=150
height=100
class=b5
hspace=10
vspace=4></td>
<td
width=10></td>
<td><img
src=images/logo1.jpg
width=150
height=100
class=b5
hspace=10
vspace=4></td>
<td
width=10></td>
</tr>
</table></td>
<td
id=demo2
valign=top></td>
</tr>
</table>
</div>
<script>
var
speed=10
demo2.innerHTML=demo1.innerHTML
function
Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function()
{clearInterval(MyMar)}
demo.onmouseout=function()
{MyMar=setInterval(Marquee,speed)}
</script>
</td>
</tr>
</table>