JavaScript is a very easy way to add all sorts of dynamic elements to your site. Unless you've had some programming experience, JavaScript will be quite a new concept at the start — it's fairly different to HTML. In this tutorial we'll be laying some groundwork on the language, and writing our first script. JavaScript is a scripting language that will allow you to add real programming to your WebPages.
You can create small application type processes with JavaScript, like a calculator or a primitive game of some sort. However, there are more serious uses for JavaScript:
-
Browser Detection
Detecting the browser used by a visitor at your page. Depending on the browser, another page specifically designed for that browser can then be loaded.
-
Cookies
Storing information on the visitor's computer, then retrieving this information automatically next time the user visits your page. This technique is called "cookies".
-
Control Browsers
Opening pages in a customized windows, where you can specify weather the browser's buttons, menu line, status line or whatever should be present or not.
-
Validate Forms
Validate inputs to fields before submitting a form.
An example would be validating the entered email address to see if it has a @ in it, since if not, it's not a valid address.
To begin learning JavaScript, you will need to have a few things. Here they are:
- You should know how to use HTML and be able to edit your HTML documents. If you want to learn HTML, click.
- You will need to have a web browser that supports JavaScript. You should use version 3 or later, or version 3.02 or later. If you use IE, I recommend IE4 because IE3.x is not compatible with all of the scripts.
- You do not need to know how to do programming....I'll show you what you need to know for these basic scripts. If you want to try creating your own scripts, programming knowledge is helpful. Check out our for more documentation on using JavaScript.
|