1. Home
  2. Computing & Technology
  3. JavaScript

Time of Day Image

3. Obtain the Script

Join the Discussion

Questions? Comments?

Now that you have the image, the next step is to copy the following script and attach it to the head section of your page.

Once you have copied the code you just save it to an external javascript file. I called mine tod.js. You then link it into the head of your page using the following code:

<script type="text/javascript" src="tod.js">
</script>

The final step is to call the script.

1 | 2 | 3 | 4
Explore JavaScript
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

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

  1. Home
  2. Computing & Technology
  3. JavaScript

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

All rights reserved.