看这个教程:http://www.1studio.net/html/example/0009/0009.htm

解决方案 »

  1.   

    <HTML><HEAD><TITLE>tvnet</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <SCRIPT language=JavaScript>
    <!--//
    var x = 0;
    var y = 0;
    var limdex = 1232;
    var dest = 0;
    var distance = 0;
    var step = 0;
    var destination = 0;
    var on = true;function scrollit(destination) {
    step = 2;
    dest = destination;
    if (x<dest & x < limdex){
    while (x<dest) {
    step += (step / 7);
    x += step;
    parent.frames[1].scroll(x,0);
    }  
                            // top.main.scroll(dest,0);
    if(dest <=limdex) { parent.frames[1].scroll(dest,0); }
    x = dest;
    }
    if (x > dest)  {
    while (x>dest) {
    step += (step / 7);
    if(x >= (0+step)) { x -= step; parent.frames[1].scroll(x,0); }
    else break;
    }
    if(dest >= 0) { parent.frames[1].scroll(dest,0); }
    x = dest;
    }
    if (x<1) { parent.frames[1].scroll(1,0); x=1 }
    if (x>limdex) { parent.frames[1].scroll(limdex,0); x=limdex }
    x = dest;
    }function scrollnow() {
                    if (on){
                    if (x < limdex & x >= 0 ) {              
                                    parent.frames[1].scroll(x,0);
                                
                            x = x + 1;
                            
                            setTimeout('scrollnow()', 8);
            
                    }
                    else if (x < 0) {
                    
                            x = limdex;
                            scrollnow();
                    }
                else {
                    
                    x=0;
                    scrollnow();
                    }
                    }}// *********************************
    // 去掉原来的stopscroll()
    function stopscroll() {
            if (on){
            on = false;
            }
            else {
            on = true;
            scrollnow();
            }
            
    }
    function startscroll() { on = true; scrollnow(); }
    function stop_start() { 
    if (on){ on = false;}else { on = true;scrollnow();}
    }
    //***********************************//--></SCRIPT>
    <link rel="stylesheet" href="/tvnet.css" type="text/css">
    <META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
    <BODY leftMargin=0 topMargin=0 onload=scrollnow() marginwidth="0" marginheight="0" bgColor=#2d5983>
    <TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
      <TR>
    <TD width=315 bgColor=#2d5983></TD>
        <TD width=120 align=center bgColor=#2d5983><A href="javascript:scrollit(x-150%20+%20y)"><IMG height=23 src="menu.files/img_btn_leftarrow.gif" width=36 border=0 name=img_btn_leftarrow></A><A href="javascript:stopscroll()"><IMG height=23 src="menu.files/img_btn_stop.gif" width=38 border=0 name=img_btn_stop alt="暂停滚动"></A><A href="javascript:scrollit(x+150%20+%20y)"><IMG height=23 src="menu.files/img_btn_rightarrow.gif" width=36 border=0 name=img_btn_rightarrow></A>
    </TD>
    <TD  width=315 align=right bgColor=#2d5983><A HREF="http://www.tvnet.com.cn/" onmouseover="window.event.srcElement.title='中国影视网';return true" target=_top><span class=sans>Powered By TVnet.com.cn</FONT></span></A>&nbsp;</TD>
    </TR>
    </TABLE>
    </BODY></HTML>
      

  2.   

    多些几位老大,,bencalie(Bencalie) 大哥拜托发一下,还有sjsky(sky)大哥你的代码我执行说有错误,最后 qisanyou(www.qisanyou.com)大哥感谢你提供的教程,我基本上已经明白了,再次谢谢各位老大。