I missed the lesson on Javascript today in Web Page design, and all I have is a copy of the code. I typed it up in notepad, yet I get just a blank screen in IE. It is just the Javascript that does not work.
Here is the Java code:
Edit- Even with the CODE tag, it doesnt want to display the code. gah!
Here is the Java code:
Code:
<SCRIPT LANGUAGE = "JavaScript">
<!--
now = new Date();
hour = now.getHours();
if (hour > 6 && hour < 16) {
document.bgColor = "#FFFFFF";
document.fgColor = "#000000";
document.write ("<CENTER><IMG HEIGHT = 150 WIDTH = 515 SRC = 'daytimepictureputhere.gif'>");
document.write ("<P>It's school time and the new day is dawning. Are you prepared?</CENTER>");
}
else {
document.bgColor = "#000000";
document.fgColor = "#FFFFFF";
document.write ("<CENTER><IMG HEIGHT = 150 width = 515 SRC = 'nighttimepictureputhere.jpg'>");
document.write ("<P>The school day is done and all is at peace. See you tomorrow.
</CENTER>");
}
// -->
</SCRIPT>

Comment