黔江民族医院正阳新院:js特效问题

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 15:41:47
我想做一个从下到上滚动的字的效果,找到了一段代码,但是这段代码走了几遍就停了,不知道什么原因,哪些好心人给我看看,如果有好使的代码给我也行,代码如下:

<table width="180" height="161" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr>
<td><table width="178" height="159" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F8F8F8">
<tr>
<td><DIV id=bulletindemo style="OVERFLOW: hidden; WIDTH: 170px; HEIGHT: 150px">
<DIV id=bulletindemo1>
<p>
<center>
<font color=red>热烈庆祝</font>
</center>
<br>
<center>
<font color=red>丹东市兴仁小学</font>
</center>
<br>
<center>
<font color=red>网站开通</font><br>
<br>
<br>
<br>
<br>
<br>
</center>
</p>
<center>
<DIV id=bulletindemo2></DIV>
</center>
</div>
</div>
<center>
<script language="javascript">
var speed=30;
bulletindemo2.innerHTML=bulletindemo1.innerHTML + bulletindemo1.innerHTML +bulletindemo1.innerHTML
var bulletMyMar=setInterval(BulletinMarquee,speed)
function BulletinMarquee()
{
if(bulletindemo2.offsetTop-bulletindemo.scrollTop<=0)
bulletindemo.scrollTop-=bulletindemo1.offsetHeight
else{
bulletindemo.scrollTop = bulletindemo.scrollTop+1;
}
}
bulletindemo.onmouseover=function() {clearInterval(bulletMyMar)}
bulletindemo.onmouseout=function() {bulletMyMar=setInterval(BulletinMarquee,speed)}
</script>
</center></td>
</tr>
</table></td>
</tr>
</table>

这个比那个好用

而且鼠标在上面还能停,离开又能继续走

<html>
<head>
<title> New Document </title>
<style>
A.News
{
FONT-SIZE:12px;
TEXT-decoration : none;
COLOR:#003366;
}
A.News:active
{
FONT-SIZE:12px;
TEXT-decoration : underline;
COLOR:#003366;
}
A.News:link
{
FONT-SIZE:12px;
TEXT-decoration : none;
COLOR:#003366;
}
A.News:visited
{
FONT-SIZE:12px;
TEXT-decoration : none;
COLOR:#003366;
}
A.News:hover
{
FONT-SIZE:12px;
TEXT-decoration : underline;
COLOR:#990000;
}
</style>
</head>

<body>
<MARQUEE onmouseover=this.stop() onmouseout=this.start()
scrollAmount=1 file://这里设置滚动速度,将1改成其它数看看
scrollDelay=4 direction=up
width=168 height=110 file://设置滚动区域的宽高
style="line-height: 150%; "><a href="http://www.baidu.com" class="News">www.baidu.com</a><br>
<a href="#" class="News">E网资源站</a><br>
<a href="#" class="News">教程特效</a><br>
<a href="#" class="News">电影音乐</a></MARQUEE>

</body>
</html>

我有一个最简单的
<html>
<head>
<body>
<marquee direction="up"></marquee>
</body>
</head>
</html>