有声小说 > 其他小说 > 电脑十万个为什么 > 第42章
  0)  {

    dot.write("      dot.write("absolute;  Z-INDEX:  "+  i  +";  VISIBILITY:  ");

    dot.write("visible;  TOP:  15px;  L

    EFT:  15px;\"&");

    dot.write(",");

    }

    else  {

    dot.write("      dot.write("absolute;  Z-INDEX:  "+  i  +";  VISIBILITY:  ");

    dot.write("visible;  TOP:  15px;  LEFT:  15px;\"&");

    dot.write("’");  //设定雨点的字符

    }

    }

    }

    fun  initRain()  {

    a  =  6;

    r[  =  1;

    sn  =  Math.sin(a);

    bsp; =  Math.cos(a);

    bsp; =  Math.rando)  *  doc_width  +  1;

    bsp; =  Math.rando)  *  doc_height  +  1;

    x[  =  r[  *  sn  +  cx[;

    y[  =  cy[;

    }

    fun  keRain()  {

    r[  =  1;

    bsp; =  Math.rando)  *  doc_width  +  1;

    bsp; =  1;

    x[  =  r[  *  sn  +  cx[;

    y[  =  r[  *  bsp; +  cy[;

    }

    fun  updateRain()  {

    r[  +=  s;

    x[  =  r[  *  sn  +  cx[;

    y[  =  r[  *  bsp; +  cy[;

    }

    fun  raindropNS()  {

    for  (i  =  0;  i  &;  no;  ++  i)  {

    updateRain();

    if  ((x[  =  (doc_height  -  20)))  {

    keRain();

    doc_width  =  self.innerWidth;

    doc_height  =  self.in;

    }

    dot.yers["dot"+.top  =  y[;

    dot.yers["dot"+.left  =  x[;

    }

    setTiout("raindropNS()",  speed);

    }

    fun  raindropIE()  {

    for  (i  =  0;  i  &;  no;  ++  i)  {

    updateRain();

    if  ((x[  =  (doc_height  -  20)))  {

    keRain();

    doc_width  =  dot.body.tWidth;

    doc_height  =  dot.body.tHeight;

    }

    dot.all["dot"+.