1,
<style>a{display:block;font-size:15px};</style>
<div id="div1" style="300px;height:68px;overflow:hidden">
<a href="javascript:">1,你可曾有过无数的梦想,</a>
<a href="javascript:">2,却在时光的流逝里幻灭 </a>
<a href="javascript:">3,你可曾对未来期待憧憬,</a>
<a href="javascript:">4,却在成长的岁月中迷失</a>
<a href="javascript:">5,CSDN中国程序员论坛</a>
<a href="javascript:">6,大家一起来</a>
<a href="javascript:">7,好象都很不错的样子</a>
</div>
<script>
var t=setInterval(myfunc,1000)
var d=document.getElementById("div1")
function myfunc(){
var o=d.firstChild
d.removeChild(o)
d.appendChild(o)
}
d.onmouseover=function(){clearInterval(t)}
d.onmouseout=function(){t=setInterval(myfunc,1000)}
</script>
2,
<div id="marquees">
<a href="#">链接一</a><br>
<br>
<a href="#">链接二</a><br>
<br>
<a href="#">链接三</a><br>
<br>
<a href="#">链接四</a><br>
<br>
</div>
<script language="JavaScript">
marqueesHeight=200;
stopscroll=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>