Клуб WEB Мастеров
Пт, 27.06.2025, 08.41.11
[ Обновленные темы · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Изменение цвета фона каждыи 5 секунд
KazrexДата: Вс, 15.01.2012, 04.40.40 | Сообщение # 1
Admin
Группа: Администраторы
Сообщений: 570
Статус: Ofline
Каждыи 5 секуннд менят цвет
Ставит любои месту
Code
<script language="JavaScript">
<!--  
function setbackground()
{
window.setTimeout( "setbackground()", 5000); // 5000 milliseconds delay
var index = Math.round(Math.random() * 9);
var ColorValue = "FFFFFF"; // default color - white (index = 0)
if(index == 1)
ColorValue = "FFCCCC"; //peach
if(index == 2)
ColorValue = "CCAFFF"; //violet
if(index == 3)
ColorValue = "A6BEFF"; //lt blue
if(index == 4)
ColorValue = "99FFFF"; //cyan
if(index == 5)
ColorValue = "D5CCBB"; //tan
if(index == 6)
ColorValue = "99FF99"; //lt green
if(index == 7)
ColorValue = "FFFF99"; //lt yellow
if(index == 8)
ColorValue = "FFCC99"; //lt orange
if(index == 9)
ColorValue = "CCCCCC"; //lt grey
document.bgColor=ColorValue;
}
// -->
</script>
<body>
<script language="JavaScript">
<!--
setbackground();
//-->
</script>


suite

New York
  • Страница 1 из 1
  • 1
Поиск:
KAZREX © 2025