<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> </head> <body> <div> <div id=demo style="overflow:hidden; WIDTH: 204px; align:center"> <table cellspacing="0" cellpadding="0" align="center" border="0"> <tbody> <tr> <td id="marquePic1" valign="top"> <table width="660" height="80" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="66" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> <td width="77" align="center"><img src="image/likaifu.jpg" width="55" height="60"></td> </tr> <tr> <td height="5" align="center" >李开复</td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center" bgcolor="#FFFF99"> </td> </tr> </table> </td> <td id="marquePic2" valign="top"></td> </tr> </tbody> </table> </div> <script type=text/javascript> var speed=35 //定义速度,实指下面滚动函数的执行间隔,值越小滚动越快 marquePic2.innerHTML=marquePic1.innerHTML //将demo1中的内容复制到demo2 function Marquee(){ //开始定义滚动函数 if(demo.scrollLeft>=marquePic1.scrollWidth){ //如果滑动块的位置大于demo2的宽度,滑动块退回一个demo2的宽度 demo.scrollLeft=0 }else{ //否则,滑动块向右滚动(图片向左滚) demo.scrollLeft++ }} //滚动函数定义完 var MyMar=setInterval(Marquee,speed) //设置定时器,使滚动函数每30毫秒运行一次 demo.onmouseover=function() {clearInterval(MyMar)} //鼠标经过时,清除定时器,停止执行滚动函数,弹出信息; demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} // 鼠标离开后,继续滚动 </script> </div> </body> </html>