1. Home
  2. Computing & Technology
  3. JavaScript
photo of Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript since 2004

Improved Author Time Script

Saturday November 1, 2008
Use modern Javascript coding methods to separate the behaviour of your web page from the content (HTML) and appearance (CSS)

This new version of my author time script not only gives you the ability to display the time where you are on your web page but it also adds the ability to optionally display the date as well in either international or US format. The script has also been rewritten so that it no longer uses either document.write or innerHTML and instead uses the proper DOM calls to insert the text into the web page. Comparing it with the original author time script may help you to work out how to update your own scripts to use the Document Object Model the way that the improved author time script does.
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.