176、文字连续闪烁

176、文字连续闪烁

脚本说明:

第一步:把如下代码加入<body>区域中

<script language="JAVASCRIPT">

     colors2 = new Array(6);

     colors2[0]="#000000";

     colors2[1]="#333300";

     colors2[2]="#665500";

     colors2[3]="#997700";

     colors2[4]="#CC9900";

     colors2[5]="#FFCC00";

 

     var i=0;

     function fLi2() {

             line2.style.visibility = "visible";

             if (i<6) {

                     line2.style.color = colors2[i];

                     i++;

                     timerID2 = setTimeout( "fLi2()", 16);

             }

             else {

             i=0;

             line2.style.visibility="hidden";

             TimerID2=setTimeout("fLi2()",1000);

             }

       }

     </script>

 

     <div id=line2 style="container:positioned; position=relative; width=50%; height=10%; left=10%;

      font-family=Arial; font-size=35px; line-height=28px; color=black; visibility=hidden;">

     JavaScript Planet

     </div>

 

 

 

第二步:把如下代码加入<body>区域中

<body bgcolor="#fef4d9" onload="TimerID2=setTimeout('fLi2()',500)" onunload="clearTimeout(TimerID2)">

 

Write a comment

Comments: 0