如何用javascript做图片得横向不间断滚动
我找了个javascript得图片滚动代码,但是我运行得时候报错——“deme2”未定义。
请高手帮我解决下,谢谢!!!代码如下
<div id=deme style= "OVERFLOW: hidden; WIDTH: 750px; HEIGHT: 145px ">
<table cellPadding=0 align=center border=0 cellspace= "0 ">
<tr>
<td id=deme1 vAlign=top>
<table width= '100% ' cellpadding= '0 ' cellspacing= '5 ' border= '0 ' align= 'left '>
<tr valign= 'top '>
<td align= 'center '> <img src= "图片地址 " width= "155 " height= "117 " title= "图片说明 "> </td>
<td align= 'center '> <img src= "图片地址 " width= "155 " height= "117 " title= "图片说明 "> </td>
<td align= 'center '> <img src= "图片地址 " width= "155 " height= "117 " title= "“图片说明 "> </td>
</tr>
<tr>
<td align= 'center '> 图(1) </td>
<td align= 'center '> 图(2) </td>
<td align= 'center '> 图(3) </td> </tr>
</table> </td>
<td id=deme2 vAlign=top> </td>
</tr>
</table>
</div>
<SCRIPT>
var speed=40
deme2.innerHTML=deme1.innerHTML
function Marquee12(){
if(deme2.offsetWidth-deme.scrollLeft <=0)
deme.scrollLeft-=deme1.offsetWidth