<div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff>
<div id=demo1>
<img src="/down/js/images/12460764740.jpg">
<img src="/12460764741.jpg">
<img src="/images/12460764742.jpg">
<img src="/12460764743.jpg">
<img src="/12460764744.jpg">
</div>
<div id=demo2></div>
</div>
<script>
var speed=50
demo2.innerhtml=demo1.innerhtml
function marquee(){
if(demo2.offsettop-demo.scrolltop<=0)
demo.scrolltop-=demo1.offsetheight
else{
demo.scrolltop++
}
}
var mymar=setinterval(marquee,speed)
demo.onmouseo教程ver=function() {clearinterval(mymar)}
demo.onmouseout=function() {mymar=setinterval(marquee,speed)}
</script>
滚动代码二
<html>
<head>
<title>不间断循环向上滚动的文本特效</title>
</head>
<body>
<div id="marquees">
<a href="#">www.111cn.net欢迎您1</a><br>
<br>
<a href="#">www.111cn.net欢迎您2</a><br>
<br>
<a href="#">www.111cn.net欢迎您3</a><br>
<br>
<a href="#">www.111cn.net欢迎您4</a><br>
<br>
</div>
<script language="网页特效">
marqueesheight=200;
stops教程croll=false;
with(marquees){
style.width=0;
style.height=marqueesheight;
style.overflowx="visible";
style.overflowy="hidden";
nowrap=true;
onmouseover=new function("stopscroll=true");
onmouseout=new function("stopscroll=false");
}
document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');
pretop=0; currenttop=0;
function init(){
templayer.innerhtml="";
while(templayer.offsetheight<marqueesheight){
templayer.innerhtml+=marquees.innerhtml;
}
marquees.innerhtml=templayer.innerhtml+templayer.innerhtml;
setinterval("scrollup()",10);
}
document.body.onload=init;
function scrollup(){
if(stopscroll==true) return;
pretop=marquees.scrolltop;
marquees.scrolltop+=1;
if(pretop==marquees.scrolltop){
marquees.scrolltop=templayer.offsetheight-marqueesheight;
marquees.scrolltop+=1;
}
}
</script>