|
Note that the script goes in the HEAD
of the document.
<Html>
<Head>
<title>Customize your message for the time of day</title>
<script language=javascript>
<!-- Hide script from old browsers
now = new Date
if (now.getHours() < 9)
{ document.write ("Good Morning") }
else if (now.getHours() <17) {
document.write ("Good afternoon") }
else { document.write ("Good evening") }
// end hiding script from old
browsers -->
</script>
<Body bgcolor=white></body>
</html>
Click here
to see it in action.
|