代码如下:
<div id="demo" style="margin-top: 2px; overflow: hidden; width: 993px; height: 150px">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td id="demo1">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090505162803.html" target="_blank">
<img height="114" alt="“纪念五四运动90周年”暨歌唱祖国大合唱比赛" src="flow_files/2009.5.4.1.jpg" width="134"
border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090505162803.html" target="_blank">
“纪念五四运动90周年”暨歌唱祖国大合唱比赛 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090512082905.html" target="_blank">
<img height="114" alt="诸迪教授来我院作学习实践科学发展观艺术教学专题报告" src="flow_files/zhudi.jpg" width="134"
border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090512082905.html" target="_blank">
诸迪教授来我院作学习实践科学发展观艺术教学专题报告 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090519092312.html" target="_blank">
<img height="114" alt="我院运动健儿校运会上再创佳绩" src="flow_files/_DSC0103.JPG" width="134"
border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090519092312.html" target="_blank">
我院运动健儿校运会上再创佳绩 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/4/20090408151906.html" target="_blank">
<img height="114" alt="汤姆•格林教授来我院举办专题讲座" src="flow_files/jnd.jpg" width="134"
border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/4/20090408151906.html" target="_blank">
汤姆•格林教授来我院举办专题讲座 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090526180247.html" target="_blank">
<img height="114" alt="“5.25”心理健康宣传活动" src="flow_files/2009.5.26.jpg" width="134"
border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090526180247.html" target="_blank">
“5.25”心理健康宣传活动 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090527170314.html" target="_blank">
<img height="114" alt="学生肖琴、教师于淼分别荣获2008世界旅游形象大使中国区总决赛亚军和季军" src="flow_files/jinzhong.jpg"
width="134" border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/5/20090527170314.html" target="_blank">
学生肖琴、教师于淼分别荣获2008世界旅游形象大使中国区总决赛亚军和季军 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/6/20090609114735.html" target="_blank">
<img height="114" alt="设计艺术系09届毕业生作品展" src="flow_files/2009.6.2.jpg" width="134"
border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/6/20090609114735.html" target="_blank">
设计艺术系09届毕业生作品展 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<table height="128" cellspacing="0" cellpadding="0" width="149" border="0" valign="top">
<tbody>
<tr>
<td style="padding-left: 5px; padding-top: 5px; background-repeat: no-repeat" valign="top"
align="left" width="139">
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/6/20090623083905.html" target="_blank">
<img height="114" alt="摄影专业作品展在北京中国摄影家协会阳光大厅开展" src="flow_files/096231.jpg" width="134"
border="0"></a>
</td>
<td width="10">
</td>
</tr>
<tr align="middle">
<td>
<a href="http://www.qfmy.tyut.edu.cn/archives/2009/6/20090623083905.html" target="_blank">
摄影专业作品展在北京中国摄影家协会阳光大厅开展 </a>
</td>
<td width="10">
</td>
</tr>
</tbody>
</table>
</td>
<!--begin loop-->
<!-- for example this is static script >
<td><table height=128 cellspacing=0 cellpadding=0 width=149 border=0>
<tbody>
<tr>
<td
style="PADDING-LEFT: 5px; PADDING-TOP: 5px; BACKGROUND-REPEAT: no-repeat"
valign=top align=left width=139><a
href="#"
target=_blank><img height=114 alt=成品展示
src="2(1).jpg"
width=134 border=0></a></td>
<td width=10> </td>
</tr>
</tbody>
</table>
</td>
<!--end loop-->
</tr>
</tbody>
</table>
</td>
<td id="demo2">
</td>
</tr>
</tbody>
</table>
</div>
<script language="javascript" type="text/javascript">
var speed = 25//速度数值越大速度越慢
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>