![]() |
|
Overview JavaScript offers a way to add intelligence and interactivity to Web pages. With JavaScript, you can:
Before JavaScript, creating interactive Web pages was far more difficult--for the page designer and the hardware. Collecting and processing user data required something called a common gateway interface (CGI) script that ran on the Web server. To use a CGI script, you first design an HTML-based Web page containing forms to gather input from users. Then you create (or pay someone to create) a CGI script in C or Perl to process the gathered input on the Web server. Unfortunately, each time a user views the page and submits the form, the data travels from the Web browser to the CGI script. The CGI script then processes the data and returns any results to the user in the form of a new HTML-based Web page. This happens every time a user makes changes to the Web form, thus soaking up the server's CPU power and wasting time sending information back and forth across the Internet connection. Why Use JavaScript? JavaScript solves many of these problems by collecting and processing the data inside the browser on the user's system, although you may still need to send the processed data to a CGI script afterward. JavaScript is also an interpreted language, meaning it doesn't end up as an executable file for a specific computer. Instead, the code runs only on a JavaScript interpreter in the user's browser. You can write JavaScript code once, and it will work on any system with a JavaScript-capable browser (Netscape Navigator 2.0 or later, or Microsoft Internet Explorer 3.0 or later) on any computer platform. Who Developed JavaScript? Originally called "LiveScript", JavaScript was designed by by Sun Microsystems and Netscape as an easy-to-use adjunct to the Java programming language. Information extracted from the following websites:
|
| ©2000 Peggy Wong |