This Week's Homework Challenge
(1) Create a web page that displays the current time and the date on one line. (See top of page. I work at an AF Base, so military time works for me.)
(2) Experiment with IF-ELSE statements. try to find clever ways to mix these statements into the basic Date and Time scripts.
Time example:
Greeting Example:
Note from hellen5: Basic season change script here. But I want to say I really like Deb's script where her images change with the season also and I want to use that script to change my banner/header on my home page which I "try" to change each month or Holiday, but don't always remember to. This way I could upload the images way ahead of time and just tell it to change each month. Well, I think I could work it to change for a specific day too, but not sure about that right now. Lot's to learn yet.
(3) Optional: Upload your homework page to the Web and post the URL where your work can be viewed on the class bulletin board so that fellow students can browse what you have done.
(4) Visit at least three homework pages created by classmates to see how they have used the Javascript techniques discussed in this week's lesson.
Note from hellen5: James/Chinhouse suggested a change to the Last Updated/Modified script (to someone else) using the lastModified as a variable, so that you could display the date in any format that you wanted it to show in. Here is my version of the script and it works! See the bottom of the page.
var Month = new Array("January","February","March","April", "May","June","July","August","September", "October","November","December") var aDate = new Date(document.lastModified) document.write("Last Updated:" + " " + aDate.getDate() + " " + Month[aDate.getMonth()] + " " + aDate.getFullYear() + " ") hour = aDate.getHours() minute = aDate.getMinutes() document.write(hour + ":" + minute).....hellen5
Forward to Week 3
Back to Week 1
Back to Energinzing Javascript Index
My VU Index