第一步:把如下代码加入%26lt;head%26gt;区域中
%26lt;SCRIPT language=javascript1.2%26gt;
%26lt;!--
hexa = new Array(16);
for(var i = 0; i %26lt; 10; i++) hexa[i] = i;
hexa[10]=%26quot;a%26quot;;
hexa[11]=%26quot;b%26quot;;
hexa[12]=%26quot;c%26quot;;
hexa[13]=%26quot;d%26quot;;
hexa[14]=%26quot;e%26quot;;
hexa[15]=%26quot;f%26quot;;
function hex(i)
{
if (i %26lt; 0) return %26quot;00%26quot;;
else if (i %26gt; 255) return %26quot;ff%26quot;;
else return %26quot;%26quot; + hexa[Math.floor(i/16)] + hexa[i%16];
}
function setbgColor(r, g, b)
{
var hr = hex(r);
var hg = hex(g);
var hb = hex(b);
document.bgColor = %26quot;#%26quot;+hr+hg+hb;
}
function fade(sr, sg, sb, er, eg, eb, step)
{
for(var i = 0; i %26lt;= step; i++)
{
setbgColor( Math.floor(sr * ((step-i)/step) + er * (i/step)),
Math.floor(sg * ((step-i)/step) + eg * (i/step)), Math.floor(sb *
((step-i)/step) + eb * (i/step)));
}
}
//--%26gt;
%26lt;/SCRIPT%26gt;
第二步:把如下代码加入%26lt;body%26gt;区域中
%26lt;SCRIPT language=javascript1.2%26gt;
%26lt;!--
for(i=1;i%26lt;=10;i++)
{
document.write(%26quot;%26lt;div id=%26quot;star%26quot;+i+%26quot;%26quot; style=%26quot;position:absolute;top:80%;left:%26quot;+(Math.floor(Math.random()*5)+9*(i-1))+%26quot;%;width:21;height:21;visibility:hidden;%26quot;%26gt;%26lt;dd%26gt;%26lt;img src=%26quot;star.gif%26quot; WIDTH=%26quot;21%26quot; HEIGHT=%26quot;21%26quot;%26gt;%26lt;/dd%26gt;%26lt;/div%26gt;%26quot;);
}
function randommove()
{
for(i=1;i%26lt;=10;i++)
eval(%26quot;star%26quot;+i+%26quot;.style.top=get_top()%26quot;);
}
function get_top()
{
var t,t2;
t=Math.floor(Math.random()*380);
t2=t.toString()+%26quot;px%26quot;;
return(t2);
}
function set_visible()
{
for(i=1;i%26lt;=10;i++)
eval(%26quot;star%26quot;+i+%26quot;.style.visibility=%26quot;visible%26quot;%26quot;);
banner.style.visibility=%26quot;visible%26quot;;
friends.style.visibility=%26quot;visible%26quot;;
high(pic);
}
function bar_show()
{ bar.style.visibility=%26quot;visible%26quot;;
}
function start_it()
{
fade(255,255,255, 0,0,0, 50);
setInterval(%26quot;randommove()%26quot;,1000);
set_visible();
setTimeout(%26quot;bar_show()%26quot;,2000);
}
function end_it()
{
banner.style.visibility=%26quot;hidden%26quot;;
friends.style.visibility=%26quot;hidden%26quot;;
pic.style.visibility=%26quot;hidden%26quot;;
fade(0,0,0,255,255,255,10);
}
--%26gt;
%26lt;/SCRIPT%26gt;
第三步:把%26lt;body%26gt;改为
%26lt;BODY aLink=#ffffff bgColor=#ffffff link=#ffffff onload=start_it()
onunload=end_it() text=#ffffff topMargin=0 vLink=#ffffff%26gt;

