javascript滚动 javascript滚动

javascript滚动

<div align="center" id="demo" style="overflow:hidden;height:200px;width:95px;border-width:1px 1px 1px 1px;border-style:dotted dotted dotted dotted;">
    <div id="demo1">
        <!-- 定义内容-->
        <img src="images/logo_1.gif">
        <img src="images/logo/flashempire.gif">
        <img src="images/logo.gif">
        <img src="images/logo/5dmedia.gif">
        <img src="images/logo/macromedia.gif">
        <img src="images/logo/sucaiw.gif">
        <img src="images/logo/blueieda.gif">
        <img src="images/logo/htmlcn.gif">
        <img src="images/logo/fwcn.gif">
    </div>
    <div id="demo2"></div>
</div>

<script language="javascript" type="text/javascript">
<!--
var demo = document.getElementById("demo");
var demo1 = document.getElementById("demo1");
var demo2 = document.getElementById("demo2");
var speed=10; 
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.onmouseover = function(){clearInterval(MyMar)}    
demo.onmouseout = function(){MyMar = setInterval(Marquee,speed)}   
-->
</script>

评论 0

挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
提交评论

清空信息
关闭评论