Fork me on GitHub

跑马灯

  

 1 <html>
 2 <head>
 3     <meta charset="utf-8">
 4 <script language="JavaScript">
 5 <!-- Hide
 6 var scrtxt="怎麽样 ! 很酷吧 ! 您也可以试试."+"Here goes your message the visitors to your
 7 page will "+"look at for hours in pure fascination...";
 8 var lentxt=scrtxt.length;
 9 var width=100;
10 var pos=1-width;
11 function scroll() {
12 pos++;
13 var scroller="";
14 if (pos==lentxt) {
15 pos=1-width;
16 }
17 if (pos<0) {
18 for (var i=1; i<=Math.abs(pos); i++) {
19 scroller=scroller+" ";}
20 scroller=scroller+scrtxt.substring(0,width-i+1);
21 }
22 else {
23 scroller=scroller+scrtxt.substring(pos,width+pos);
24 }
25 window.status = scroller;
26 setTimeout("scroll()",150);
27 }
28 //-->
29 </script>
30 </head>
31 <body onLoad="scroll();return true;">
32 这里可显示您的网页 !
33 </body>
34 </html>

 

posted @ 2015-10-14 19:25  ZZZZW  阅读(173)  评论(0编辑  收藏  举报
AmazingCounters.com