Показать сообщение отдельно

  #3  
Старый 25.11.2007, 23:38
in_colour
Новичок
Регистрация: 26.08.2007
Сообщений: 22
Провел на форуме:
210350

Репутация: 10
Отправить сообщение для in_colour с помощью ICQ
По умолчанию

Ферас спасибо, у меня есть что-то похожее.

Код HTML:
<script language="JavaScript">
<!-- Start of JavaScript code

function setbackground()
{


    var index = Math.round(Math.random() * 13);

    var ColorValue = "FFFFFF"; // (index = 0)

    if(index == 1)
        ColorValue = "FFCCCC";
    if(index == 2)
        ColorValue = "CCAFFF";
    if(index == 3)
        ColorValue = "A6BEFF";
    if(index == 4)
        ColorValue = "99FFFF";
    if(index == 5)
        ColorValue = "D5CCBB";
    if(index == 6)
        ColorValue = "99FF99";
    if(index == 7)
        ColorValue = "FFFF99";
    if(index == 8)
        ColorValue = "FFCC99";
    if(index == 9)
        ColorValue = "CCCCCC";
    if(index == 10)
        ColorValue = "666666";
    if(index == 11)
        ColorValue = "6600FF";
    if(index == 12)
        ColorValue = "006666";
    if(index == 13)
        ColorValue = "00FF33";


    document.bgColor=ColorValue;

}
// -- End of JavaScript code -------------- -->
</script>
Но там цвет не рандомный, а из списка, и окрашивает он не каждый пиксель по-разному, а всю страницу.
 
Ответить с цитированием