[JS11] 状态栏滚动

时间:2014-05-14 12:50:28   收藏:0   阅读:283

 

bubuko.com,布布扣
 1 <html>
 2 <head>
 3     <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 4         <title>请看状态栏的变化</title>
 5     <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
 6     <script Language="JavaScript">
 7         var msg = "欢迎你,我的朋友,让我们在 JavaScript 的世界自由翱翔吧 " ;
 8         var interval = 100
 9         var spacelen = 120;
10         var space10=" ";
11         var seq=0;
12         function scrollstr()
13         {
14             len = msg.length;
15             window.status = msg.substring(0, seq+1);
16             seq++;
17             if ( seq >= len )
18             {
19                 seq = 0;
20                 window.status = ‘‘;
21                 window.setTimeout("scrollstr();", interval );
22             }
23             else
24             window.setTimeout("scrollstr();", interval );
25         }
26         scrollstr();
27     </script>
28 </head>
29 <body>
30     <p align="center"><big><strong><font color="#0000FF" face="楷体_GB2312"><big><big>请看状态栏的变化
31     </big></big></font></strong></big></p>
32 </body>
33 </html>
bubuko.com,布布扣

 

[JS11] 状态栏滚动,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!