不是弱,慢慢来
不过你可以先搜索搜索呀
到这里搜索
或者到google里面搜索

解决方案 »

  1.   

    写个网页,但头让写个这小东西,我上午找了一个但不能用,
    请问在js里有settimeout这函数吗
      

  2.   

    <SCRIPT language="JavaScript">
    <!--
    function scrollit(seed) {
    var m1 = "HI,您 好 !            ";
    var m2 = "欢 迎 访 问 xx 网 !       ";
    var m3 = "请 多 提 意 见,谢 谢 !          ";
    var m4 = "E-MAIL:[email protected]          ";
    var m5 = "http://www.kings2.net           ";
    var msg=m1+m2+m3+m4+m5;
    var out = " ";
    var c = 1;
    if (seed > 100) {
    seed--;
    cmd="scrollit("+seed+")";
    timerTwo=window.setTimeout(cmd,100);
    }
    else if (seed <= 100 && seed > 0) {
    for (c=0 ; c < seed ; c++) {
    out+=" ";
    }
    out+=msg;
    seed--;
    window.status=out;
    cmd="scrollit("+seed+")";
    timerTwo=window.setTimeout(cmd,100);
    }
    else if (seed <= 0) {
    if (-seed < msg.length) {
    out+=msg.substring(-seed,msg.length);
    seed--;
    window.status=out;
    cmd="scrollit("+seed+")";
    timerTwo=window.setTimeout(cmd,100);
    }
    else {
    window.status=" ";
    timerTwo=window.setTimeout("scrollit(100)",75);
    }
    }
    }
    //-->
    第二步:把如下代码加入<body>区域中
    <body background=bag.gif onLoad="scrollit(100)">
      

  3.   

    谢谢: lei414(加班王子) 了,
    我找的也是这段代码,可是循环了几次就中断了,而且字走的太快了
      

  4.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>多变的状态栏文字</title>
    </head>
    <script language="vbscript">
    <!--
    dim tid
    dim scroll_msg,scroll_out,scroll_pos,scroll_delay
    scroll_msg="欢迎你使用VBScript编程百例"
    scroll_out=""
    scroll_pos=100
    scrol_delay=5
    sub scroller
       for i=1 to scroll_pos
          scroll_out=scroll_out&" "
       next
       if scroll_pos>0 then
          scroll_out=scroll_out&scroll_msg
       else
          scroll_out=mid(scroll_msg,-scroll_pos+1,len(scroll_msg))   
       end if
       window.status=scroll_out
       scroll_out=""
       scroll_pos=scroll_pos-1
       if scroll_pos<-len(scroll_msg) then scroll_pos=100
          tid=settimeout("scroller()",scroll_delay)
    end sub
    function snapin(jumpspaces,position)
       dim msg
       msg=scroll_msg
       dim out
       out=""
       for i=1 to position
          out=out&mid(msg,i,1)
       next
       for i=1 to jumpspaces-1
          out=out&" "
       next
       out=out&mid(msg,position+1,1)
       window.status=out
       if (jumpspaces<=1) then
          position=position+1
          if mid(msg,position,1)=" " then position=position+1
          jumpspaces=100-position
       else
          if (jumpspaces>3) then
             jumpspaces=jumpspaces*0.75
          else
             jumpspaces=jumpspaces-1   
          end if   
       end if
       if (position<len(msg)) then
          cmd="snapin "&jumpspaces&","&position
          tid=window.settimeout(cmd,scroll_delay)
       else
          window.status=""
          jumpspaces=100
          position=1
          cmd="snapin "&jumpspaces&","&position
          tid=window.settimeout(cmd,scroll_delay)   
       end if
    end function
    -->
    </script>
    <script language="vbscript">
    dim speed
    speed=200
    dim messages(2)
    messages(0)="欢迎你使用VBScript编程百例"
    messages(1)="有问题请和本出版社联系"
    messages(2)="谢谢你的支持"
    dim currentmessage
    currentmessage=0
    dim offset
    offset=0
    sub showbanner
       dim text
       text=messages(currentmessage)
       if offset<len(text) then
          if mid(text,offset+1,1)=" " then offset=offset+1
             dim partialmessage
             partialmessage=mid(text,1,offset+1)
             window.status=partialmessage
             offset=offset+1
             tid=settimeout("showbanner",speed)
       else
          offset=0
          currentmessage =currentmessage+1
          if (currentmessage>ubound(messages)) then currentmessage=0
          tid=settimeout("showbanner",pause)
       end if           
    end sub
    </script>
    <body bgcolor=peachpuff>
    <center>
    <h1><font color=red>文字显示状态</font></h1>
    <input type=button value="雨 点 式" id=button2 name=button2 onclick="cleartimeout(tid):snapin 100,1">
    <br><br>
    <input type=button value="多行舒展式" id=button3 name=button3 onclick="cleartimeout(tid):showbanner">
    </center>
    </body></html>
    一步搞定
      

  5.   

    呵呵, dicklee1214(令狐冲) 谢谢你的一步到位,解决了。
    我还想问问lei414(加班王子) 
    cmd="scrollit("+seed+")";
    timerTwo=window.setTimeout(cmd,100);
    一定要写成这样吗,写成
    wingdow.setTimeout("scrollit("+seed+")",100)不行吗
      

  6.   

    我知道我的程序为什么不行了,
    不是settimeout
    而是setTimeout
    唉我错了,ie也不告诉我一声,害的我忙了一天
    谢谢各位了:)