My First JavaScriptWhen you view this page in Netscape Navigator 2.0 or later, or MS Explorer 3.0 or later, you will see the current time as set in your computer.
JavaScript is a cross-platform scripting language based on Java that lets you add nifty functions to your Web pages. The Current Time JavaScript program provides an easy way to begin learning JavaScript.
When you edit this page, you will see the following text:
document.write("The current time is "+Date()+"<P>")
This script gets the current time from your computer's clock and displays it next to the text: "The current time is."
To put this text in your Web page, you have three options:
1. Edit this page and keep the JavaScript as is.
2. Edit this page and cut and paste the JavaScript into another Netscape Navigator Gold page. You will maintain the JavaScript character formatting by doing this.
3. Type the JavaScript into your new Web page, highlight the entire script, select the Properties pull-down menu, then select the Character option and then the JavaScript (client) option. This will tell Netscape Navigator to treat the text as JavaScript.
Learn more about JavaScript.