Using Javascript
Getting started with JavaScript is quite easy. JavaScript is a client-side technology, which means that there’s no new software installed on the web server for it. JavaScript is part of the actual webpage itself, next to the HTML code. It has a special tag of its own, called the <script> tag. JavaScript code is contained within these tags in the header—a special section—of the HTML page.
JavaScript is also relatively easy to learn and is similar to languages such as Java, C, and C#. To get started with JavaScript, create a basic HTML page, and in the header, add a <script> tag. For example, you could write the following between the <head> tags:
<script language="JavaScript">
alert("Welcome to my page.");
</script>
This would create an alert box that pops up when the visitors views the page and displays a welcome message. Click here to visit this page with the above alert added using Javascript. This feature is one of the most basic in JavaScript.
JavaScript is best used tastefully and sparingly. Most users don’t want to be bombarded with messages each time they click a link—so don’t bombard them! Most users, however, do want to be informed when they’ve submitted invalid data into a form, so it’s certainly appropriate to inform them, often using JavaScript, of such.
There are excellent free resources for JavaScript all over the web. We encourage you to explore it, both for its own merits and as a gateway to more complex, but similar, technologies. The three resources below are excellent overviews for beginners.