Back to Scripts page
Click in the text area below, select all and copy to grab the script
Script listing:
<HTML> <HEAD> <TITLE>What time is it? JavaScript knows...</TITLE> </HEAD> <BODY BGCOLOR=WHITE> <H1> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers now = new Date if (now.getHours() < 5) { document.write("What are you doing up so late?") } else if (now.getHours() < 9) { document.write("Good Morning!") } else if (now.getHours() < 17) { document.write("No surfing during working hours!") } else { document.write("Good Evening!") } // End hiding script from old browsers --> </SCRIPT> </H1> </BODY> </HTML>