<table width="670" border="0" align="center" cellpadding="0" cellspacing="3">
<tbody>
<tr>
<td>
<div id="demo" style="overflow: hidden; width: 670px; height: 230px">
<table cellpadding="0" align="left" border="0" cellspace="0" width="670">
<tbody>
<tr>
<td id="demo1" valign="top">
<table cellspacing="0" cellpadding="0" width="670" border="0">
<tbody>
<tr align="center">
<td width="120">
<table width="120" border="0" cellspacing="5" cellpadding="0">
<tbody>
<tr>
<td>图片</td>
</tr>
<tr>
<td>文字</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td id="demo2" valign="top"> </td>
</tr>
</tbody>
</table>
</div>
<div id="demo0" style="overflow: hidden; width:670px; height: 230px">
<table cellpadding="0" align="left" border="0" cellspace="0" width="670">
<tbody>
<tr>
<td id="demo11" valign="top">
<table cellspacing="0" cellpadding="0" width="670" border="0">
<tbody>
<tr align="center">
<td width="120">
<table width="120" border="0" cellspacing="5" cellpadding="0">
<tbody>
<tr>
<td>图片</td>
</tr>
<tr>
<td>文字</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td id="demo22" valign="top"> </td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript" language="JavaScript">//调用向左滚动toleft("demo","demo1","demo2",30,"hehe123")//调用向右滚动toright("demo0","demo11","demo22",20,"hehe1123")function $(id){return document.getElementById(id)}//向左滚动函数,demo包含demo1与demo2,speed是滚动速度,flag一个网页内有多个时设置为不同的任意字符。function toleft(demo,demo1,demo2,speed,flag){demo=$(demo);demo1=$(demo1);demo2=$(demo2)demo2.innerHTML=demo1.innerHTMLfunction Marquee(){if(demo2.offsetWidth-demo.scrollLeft<=0){demo.scrollLeft-=demo1.offsetWidth}else{demo.scrollLeft++}}flag=setInterval(Marquee,speed)demo.onmouseover=function(){clearInterval(flag);}demo.onmouseout=function(){flag=setInterval(Marquee,speed);}}//向右滚动函数,demo包含demo1与demo2,speed是滚动速度,flag一个网页内有多个时设置为不同的任意字符。function toright(demo,demo1,demo2,speed,flag){demo=$(demo);demo1=$(demo1);demo2=$(demo2)demo2.innerHTML=demo1.innerHTMLfunction Marquee(){if(demo.scrollLeft<=0){demo.scrollLeft=demo2.offsetWidth}else{demo.scrollLeft--}}flag=setInterval(Marquee,speed)demo.onmouseover=function(){clearInterval(flag);}demo.onmouseout=function(){flag=setInterval(Marquee,speed);}}</script></td>
</tr>
</tbody>
</table>