|
|
|
|
What is Java Scripting?.
Javascript is a programming language that you can use to add interactivity to your Web pages. But if you're not a programmer, don't panic at the term "Programming Language"; there are lots of JavaScripts available on the web that you can copy and modify for your own use with a minimum of effort. In fact, standing on the shoulders of other programmers in this way is a great technique for getting comfortable with JavaScript. A JavaScript script is a program that is included on an HTML page, Because it is enclosed in the <SCRIPT> tag, the text of the script doesn't appear on the user's screen, and the Web Browser knows to run the Javascript program. The <SCRIPT> tag is most often found with in the <HEAD> section of the HTML page, though you can, if you wish, have scripts in the <BODY> section. There are many things that you can do with JavaScript to make your Web pages more interactive and provide your site's users with a better, more exciting experience. JavaScript lets you create an active user interface, giving the users feedback as they navigate your pages. For example, you've probably seen sites that have buttons that highlight as you move the mouse pointer over them. That's done with JavaScript, using a technique called a Rollover. You can use JavaScript to make sure that your users enter valid information in forms, which can save time and money. If your forms require calculations, you can do them in JavaScript on the user's machine without needing to use a complex server CGI (a program that runs on a Web server and extends the server's functions). With JavaScript, you have the ability to create custom HTML pages on the fly, depending on actions that the user takes. Let's say that you are running a travel site, and the user clicks on Hawaii as a destination.You can have the latest Hawaii travel deals appear in a new window JavaScript controls the browser, so you can open up new windows, display alert boxes, and put custom messages in the status bar of the browser window. Because JavaScript has a set of date and time features, you can generate clocks, calendars, and timestamp documents. In Netscape Navigator 3.0 and Microsoft Internet Explorer 3.0 and later, you can use JavaScript to test for the presence of browser plug-ins, and direct the user to a different page if they don't have the plug-in needed to view your page. |