大家做下一个下雨”JavaScript 脚本
A:将以下脚本放在〈Body〉〈/Body〉中间即可:");document。write(",");}else{document。write("");document。write(",");}}elseif(ie4up){if(i==0){document。 write("");document。write(",");}else{document。write("");document。write("'");//设定雨点的字符}}}functioninitRain(){a=6;r[i]=1;sn=Math。 sin(a);cs=Math。cos(a);cx[i]=Math。random(...全部
A:将以下脚本放在〈Body〉〈/Body〉中间即可:");document。write(",");}else{document。write("");document。write(",");}}elseif(ie4up){if(i==0){document。
write("");document。write(",");}else{document。write("");document。write("'");//设定雨点的字符}}}functioninitRain(){a=6;r[i]=1;sn=Math。
sin(a);cs=Math。cos(a);cx[i]=Math。random()*doc_width+1;cy[i]=Math。random()*doc_height+1;x[i]=r[i]*sn+cx[i];y[i]=cy[i];}functionmakeRain(){r[i]=1;cx[i]=Math。
random()*doc_width+1;cy[i]=1;x[i]=r[i]*sn+cx[i];y[i]=r[i]*cs+cy[i];}functionupdateRain(){r[i]+=s;x[i]=r[i]*sn+cx[i];y[i]=r[i]*cs+cy[i];}functionraindropNS(){for(i=0;i=(doc_width-20))||(y[i]>=(doc_height-20))){makeRain();doc_width=self。
innerWidth;doc_height=self。innerHeight;}document。layers["dot"+i]。top=y[i];document。layers["dot"+i]。
left=x[i];}setTimeout("raindropNS()",speed);}functionraindropIE(){for(i=0;i=(doc_width-20))||(y[i]>=(doc_height-20))){makeRain();doc_width=document。
body。clientWidth;doc_height=document。body。clientHeight;}document。all["dot"+i]。style。pixelTop=y[i];document。
all["dot"+i]。style。
pixelLeft=x[i];}setTimeout("raindropIE()",speed);}if(ns4up){raindropNS();}elseif(ie4up){raindropIE();}//End-->。收起