Имя пользователя:
Пароль:
 

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

Аватара для Prisoner

Engrossed by the Void


Сообщения: 2229
Благодарности: 60

Профиль | Отправить PM | Цитировать


Код: Выделить весь код
<html>
<head>
<title>Смена фона в зависимости от времени</title>
<meta content="text/html; charset=windows-1251" http-equiv="Content-Type">
</head>
<script language="JavaScript">
theTime = new Date();
theMonth = theTime.getMonth();
if (theMonth >= 2 && theMonth <= 4)
  document.write('<body background ="spring.gif">');
else
  if (theMonth >= 5 && theMonth <= 7)
    document.write('<body background ="summer.gif" text="white">');
  else
    if (theMonth >= 8 && theMonth <= 10)
      document.write('<body background ="autumn.gif" text="white">');
    else
      document.write('<body background ="winter.gif" text="white">');
</script>
<p align="center"> </p>
<p align="center"> </p><p align="center"><font size="4"><b>Смена фона в зависимости от
времени</b></font></p>
</body>
</html>
Реализовано глупо и просто.

-------
Не могу дать более дельный совет - не хватает системных ресурсов...


Отправлено: 02:32, 04-07-2005 | #4