http://wna.ynet.com.cn/beiqing/gundong/show.html

解决方案 »

  1.   

    还是用到了maquee,不知道对你是否有用。
    <script language=javascript>
    <!-- 
    var index = 5 
    link = new Array(6); 
    text = new Array(6); 
    text[0] ='[1] 在此输入文字' 
    text[1] ='[2] 在此输入文字' 
    text[2] ='[3] 在此输入文字' 
    text[3] ='[4] 在此输入文字' 
    text[4] ='[5] 在此输入文字' 
    document.write ("<marquee scrollamount='1' scrolldelay='100' direction= 'up' width='150' height='120'>"); 
    for (i=0;i<index;i++){ 
    document.write 
    document.write (text[i] + "</A><br>"); 
    }document.write ("</marquee>") 
    // --> 
    </script>
      

  2.   

    http://devedge.netscape.com/toolbox/examples/2002/xb/xbMarquee/examples/ch-basic.html
      

  3.   

    http://webdeveloper.earthweb.com/repository/javascripts/2002/09/99971/messagescroller.htm
      

  4.   

    have a look:http://www.ggajj.net/js/news.html
    you can edit the width=N and the height=N and the lines depend on your news
      

  5.   

    http://homepage.qdcatv.com.cn/duri/school/example/e12/index.htm
      

  6.   

    将下面的代码复制到<body>中你想该滚动条出现的地方 :
    body{
    overflow-x:hidden;
    overflow-y:scroll;
    }
    /*
    Scrollable Menu Links- By Dynamicdrive.com
    For full source, TOS, and 100s DTHML scripts
    Visit http://dynamicdrive.com
    *///configure path for left and right arrows
    var goleftimage='../tempimgs/clock/pointer2.gif'
    var gorightimage='../tempimgs/clock/pointer.gif'
    //configure menu width
    var menuwidth=300
    //configure scroll speed (1-10), where larger is faster
    var scrollspeed=6
    //specify menu content
    var menucontents='<nobr><a href="../../../www.dynamicdrive.com/index.html">Dynamic Drive</a> | <a href="../../../wsabstract.com/index.html">Website Abstraction</a> | <a href="../../../www.codearena.com/index.html">CodeArena.com</a> | <a href="../../../www.builder.com/index.html">Builder.com</a> | <a href="../../../freewarejava.com/index.html">Freewarejava.com</a></nobr>'
    ////NO NEED TO EDIT BELOW THIS LINE////////////var actualwidth=''
    var ns_scroll
    function fillup(){
    if (document.all){
    test2.innerHTML=menucontents
    actualwidth=test2.offsetWidth
    }
    else if (document.layers){
    ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
    ns_scroll.document.write(menucontents)
    ns_scroll.document.close()
    actualwidth=ns_scroll.document.width
    }
    }
    window.onload=fillupfunction moveleft(){
    if (document.all&&test2.style.pixelLeft>(menuwidth-actualwidth))
    test2.style.pixelLeft-=scrollspeed
    else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
    ns_scroll.left-=scrollspeed
    lefttime=setTimeout("moveleft()",50)
    }function moveright(){
    if (document.all&&test2.style.pixelLeft<0)
    test2.style.pixelLeft+=scrollspeed
    else if (document.layers&&ns_scroll.left<0)
    ns_scroll.left+=scrollspeed
    righttime=setTimeout("moveright()",50)
    }if (document.all||document.layers){
    with (document){
    write('<table border="0" cellspacing="0" cellpadding="0">')
    write('<td valign="middle"><a href=#" onMouseover="moveleft()" onMouseout="clearTimeout(lefttime)"><img src="'+goleftimage+'"border=0></a> </td>')
    write('<td valign="top">')
    if (document.all){
    write('<span style="position:relative;width:'+menuwidth+';">')
    write('<span style="position:absolute;width:'+menuwidth+';clip:rect(0 '+menuwidth+' auto 0)">')
    write('<span id="test2" style="position:absolute;left:0;top:0">')
    write('</span></span></span>')
    }
    else if (document.layers){
    write('<ilayer width='+menuwidth+' name="ns_scrollmenu">')
    write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')
    }
    write('</td>')
    write('<td valign="middle"> <a href="#" onMouseover="moveright()" onMouseout="clearTimeout(righttime)">')
    write('<img src="'+gorightimage+'"border=0></a>')
    write('</td></table>')
    }
    }
    提示: 把鼠标放到黑色的按钮上看看有什么效果?(先放到左方哦!)
    2.请修改代码中的这些地方
    //配置左方与右方的图片路径
    var goleftimage='pointer2.gif'
    var gorightimage='pointer.gif'
    //设置滚动条的长度
    var menuwidth=300
    //设置滚动条的速度(1-10),越大越块
    var scrollspeed=6
    //设置栏目的内容与连接
    var menucontents='<nobr><a href="http://www.dynamicdrive.com">Dynamic Drive</a> | <a href="http://wsabstract.com">Website Abstraction</a> | <a href="http://www.codearena.com">CodeArena.com</a> | <a href="http://www.builder.com">Builder.com</a> | <a href="http://freewarejava.com">Freewarejava.com</a></nobr>'
      

  7.   

    我做的是在pocket ie上运行的web页面,不支持maqueen和document.style属性,各位老兄能不能再提供一些方法。郁闷中。