• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Exercises

If you would like to gain a bit more practice working on the JavaScript features you learned in this hour, try these activities:

  • Add HTML comments to the Date and Time script, as described in the Workshop section. Verify that the script still works in your browser.

  • Add a millisecond field to the large clock. You can use the getMilliseconds statement, which works just like getSeconds but returns milliseconds.

  • Change the large clock to display UTC. You can do this by using getUTCHours, getUTCMinutes, and getUTCSeconds instead of getHours, getMinutes, and getSeconds. However, this will work only in JavaScript 1.2 or later.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint