نمایش پیغام روز بخیر طبق زمان روز:
[/B]
کد:
[B]
<!-- ONE STEP TO INSTALL TIME MESSAGE:
1. Add the coding into the BODY of your HTML document -->
<!-- STEP ONE: Put this code into the BODY of your HTML document -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>
<body>
<center>
<script LANGUAGE="JavaScript">
document.write("<center><font size=+1>")
day = new Date()
hr = day.getHours()
if (hr ==1)
document.write("بامداد بخیر ")
if (hr ==2)
document.write("نیمه شب شما بخیر")
if (hr ==3)
document.write("نیمه شب شما بخیر .... نمیروی بخوابی")
if (hr ==4)
document.write("ساعت 4 صبح شده برو بخواب")
if (hr ==5)
document.write("سحر بخیر")
if (hr ==6)
document.write("صبح زود شما بخیر")
if ((hr == 6) || (hr ==7) || (hr ==8) || (hr == 9) || (hr ==10))
document.write("صبح بخیر")
if (hr ==11)
document.write("نیمروز بخیر")
if (hr ==12)
document.write("ظهر بخیر")
if (hr ==13)
document.write("بعد از ظهر شما بخیر")
if ((hr==15) || (hr==16) || (hr==14))
document.write("عصر شما بخیر")
if ((hr==17) || (hr==18) || (hr==19) || (hr==20) || (hr==21) || (hr==22))
document.write("شب بخیر")
if (hr==23)
document.write("شب شما بخیر")
if (hr==0)
document.write("نیمه شب بخیر")
document.write("</font></center>")
// End -->
</script>
</center>
<!----- www.iranjoman.com---->