js上下滚动图片

来源:百度知道 编辑:UC知道 时间:2024/05/29 17:49:16
怎么让次表格的图片上下滚动!循环。。。给出代码。。给分!
<table width="153" border="0" cellspacing="0">
<tr>
<td width="143"><img src="提供给学生的素材/d_r11_10_r1_c116.jpg" width="143" height="112" /></td>
</tr>
<tr>
<td><img src="提供给学生的素材/d_r11_10_r1_c221.jpg" width="143" height="112" /></td>
</tr>
<tr>
<td><img src="提供给学生的素材/d_r11_10_r1_c1.jpg" width="143" height="112" /></td>
</tr>
<tr>
<td><img src="提供给学生的素材/d_r11_10_r1_c2.jpg" width="143" height="112" /></td>
</tr>
<tr>

脚本说明:
把如下代码加入<body>区域中:
<script language="JavaScript">
<!--
done = 0;
step = 4
function anim(yp,yk)
{
if(document.layers) document.layers["napis"].top=yp;
else document.all["napis"].style.top=yp;
if(yp>yk) step = -4
if(yp<60) step = 4
setTimeout('anim('+(yp+step)+','+yk+')', 35);
}
function start()
{
if(done) return
done = 1;
if(navigator.appName=="Netscape") {
document.napis.left=innerWidth/2 - 145;
anim(60,innerHeight - 60)
}
else {
napis.style.left=11;
anim(60,document.body.offsetHeight - 60)
}
}
//-->
</script>
<div id="napis" style="position: absolute;top: -50;color: #000000;font-family:宋体;font-size:9pt;">
<p><font color=blue>
欢迎光临javascript特效站</font>
</p></div>
<s