脚本特效展示
背景快速闪烁
注意:把< body>中的内容改为: < body onload="fadein(16)">
以下代码加入<head>区域
<script language="javascript"> <!-- hide from old browsers var color= new array(9); color[1] = "ff"; color[2] = "ee"; color[3] = "dd"; color[4] = "cc"; color[5] = "bb"; color[6] = "aa"; color[7] = "99"; color[8] = "88"; color[9] = "77"; color[10] = "66"; color[11] = "55"; color[12] = "44"; color[13] = "33"; color[14] = "22"; color[15] = "11"; color[16] = "00"; /* do not display text on a fading background. instead, let it fade in and out once or twice, then load a new page. */ function fadein(where) { if (where >= 1) { document.bgcolor="#" + color[where] +"0000"; where -= 1; settimeout("fadein("+where+")", 15); } else { settimeout('fadeout(1)', 15); } } function fadeout(where) { if (where <=16) { document.bgcolor="#" + color[where] +"0000"; where += 1; settimeout("fadeout("+where+")", 15) } else { settimeout("fadein(16)", 15); // window.location.href="../http://www.netscape.com/"; } } // unhide --> </script>
以下代码加入<body>区域