Java



           

Изменение фона документа. - часть 2


blu_int = ((blu_valB - blu_valA) / steps) * -1;

step = 2;

red = red_valA;

grn = grn_valA;

blu = blu_valA;

document.bgColor = begin;

while ( steps >= step ) {

red -= red_int;

red_round = Math.round(red);

red_hex = Dec2Hex(red);

grn -= grn_int;

grn_round = Math.round(grn);

grn_hex = Dec2Hex(grn);

blu -= blu_int;

blu_round = Math.round(blu);

blu_hex = Dec2Hex(blu);

document.bgColor = red_hex + grn_hex + blu_hex;

step++;

}

document.bgColor = end;

}

for (j=0;j<5;j++) {

bg_Changer("ffff00","00ff00",50);

bg_Changer("00ff00","ff0000",50);

bg_Changer("ff0000","0000ff",50);

bg_Changer("0000ff","f0ffff",50);

bg_Changer("f0ffff","7fff00",50);

bg_Changer("7fff00","ff00ff",50);

bg_Changer("ff00ff","00ffff",50);

bg_Changer("00ffff","eee8aa",50);

bg_Changer("eee8aa","ffb6c1",50);

bg_Changer("ffb6c1","98fb98",50);

bg_Changer("98fb98","afeeee",50);

}

</script>

</head>

<body>

</body>

</html>




Содержание  Назад  Вперед