<class home>  <Jscript>   <back   next>

Adding in the Date and Time

You can use Javascript to add the date and time to your pages.

example>>>


How?

1. View the document in code view.

2. In your document where you want the date to appear type in the following:

<SCRIPT LANGUAGE="javascript">
<!--
document.write("<em>"+Date()+"<\/i>")
//-->
</SCRIPT>

Javascript is enclosed in the open and closing script tags. The comment tag is used to hide the script from older browsers that may not interpret javascript. Document.write is used to write text on your page with Javascript and Date() is the date object created on your page.