CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Мои увлечения</TITLE>
<link rel="stylesheet" href="my.css" type="text/css" />
<script LANGAUGE="JavaScript"><!--
function gethello() {
var nowdate = new Date();
var nowtime = nowdate.getHours();
var hellostr = ' ';
if (nowtime>=0 && nowtime<6) {hellostr="<h1>Доброй ночи! </h1>";}
if (nowtime>=6 && nowtime<11) {hellostr="<h1>C добрым
утром! </h1>";}
if (nowtime>=11 && nowtime<18) {hellostr="<h1>Добрый день!</h1>";}
if (nowtime>=18) {hellostr="<h1>Добрый вечер!</h1>";}
return hellostr;
}
//--></SCRIPT>
</HEAD>
<BODY>
<script LANGAUGE="JavaScript"><!--
document.write(gethello());
//--></SCRIPT>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> Мои увлечения</TITLE>
<link rel="stylesheet" href="my.css" type="text/css" />
<script LANGAUGE="JavaScript"><!--
function gethello() {
var nowdate = new Date();
var nowtime = nowdate.getHours();
var hellostr = ' ';
if (nowtime>=0 && nowtime<6) {hellostr="<h1>Доброй ночи! </h1>";}
if (nowtime>=6 && nowtime<11) {hellostr="<h1>C добрым
утром! </h1>";}
if (nowtime>=11 && nowtime<18) {hellostr="<h1>Добрый день!</h1>";}
if (nowtime>=18) {hellostr="<h1>Добрый вечер!</h1>";}
return hellostr;
}
//--></SCRIPT>
</HEAD>
<BODY>
<script LANGAUGE="JavaScript"><!--
document.write(gethello());
//--></SCRIPT>
</BODY>
</HTML>