日期:2014-05-16  浏览次数:20357 次

求图片移动中,停顿数秒的JS代码
我的原代码是这样
<table   border= "0 "   width= "100% "   cellspacing= "0 "   cellpadding= "0 "   >
<tr>
<td   style= "border-top:1px   solid   #C2C2C2; ">
<marquee   scrollAmount=2     direction=up   width=150   height= "100 "   onmouseover=stop()   onmouseout=start()>
<table   border= "0 "   width= "100% "   id= "table7 "   cellspacing= "0 "   cellpadding= "0 "   >
<tr> <td   width= "88% "   align= "center "   style= "padding-top:5px;; "   >
<a   href= "url "   target= "title ">
<img   border= "0 "   src= "images/1.gif "     style= "border:1px   solid   #9AA5A6; "   > </a> </td> </tr>
<tr> <td   width= "88% "   align= "center "   style= "padding-top:5px;; "   >
<a   href= "url "   target= "title ">
<img   border= "0 "   src= "images/2.gif "     style= "border:1px   solid   #9AA5A6; "   > </a> </td> </tr> </table>
</marquee> </td>
</tr>
</table>
现在图片是可以从小到上移动了,但是如果要他可以在循环到一张图片的时候停顿几秒,怎么实现呢?

------解决方案--------------------
setTimeout

算单元格的告诉...然后就TR行写入图片...

其他为空...调用JS的时候用innerHTML写入..


用scrollHeight调整高度...