![]() |
Look at the Address or Location field at the top of your browser window and you will see the URL for the currently displayed web page. The file name of the page will often end with ".htm" or ".html" which indicates the document contains HyperText Markup Language, a collection of embedded commands used to format and organize the structure of a web document. HTML provides the means for different web browsers to display content in a more or less uniform manner.
In the early days of the World Wide Web, documents displayed on the web were static. While they contained hyperlinks that let you quickly access other web documents, the content of an individual page was did not change on the fly. They were much like the pages in a book.
As use of the web grew, so too did the need of web developers to create web sites and web documents that were dynamic. Web-based applications were too complex to be satisfied by documents that did nothing more than show text and allow the user to advance to the next page.
A number of different approaches are available to developers that allow them to create web sites that are dynamic and fun to use. JavaScript is one of the approaches.
JavaScript is a scripting language used to write small, program-like scripts that are embedded right in the web document. The format of JavaScript statements is similar to the programming languages C and C++. All the more recent versions of web browsers from Netscape and Microsoft support JavaScript, although in their rush to improve their respective products they occasionally add features not found competing browsers.
Browsers also differ in how they implement existing standards for JavaScript. Microsoft seems to be more relaxed and less strict in observing rules of syntax than Netscape. Sometimes it can be a challenge to create scripts that are compatible across browser versions. JavaScript itself provides the means to get around some of these hurdles. It can, for example, identify the browser type and version on which the page is being rendered.
For instance, you are using
To see some of the other web page tricks that JavaScript can do, check out MouseOver Madness. Have some fun with the Master Mind, a number guessing game. Use the Reverse Polish Notation Calculator to perform four-function math. Do basic Some useful scripts are short. Look at the JavaScript Sampler for some that are ready to be copied and pasted into your own web pages.