JS Basic
JS Introduction
JS How To
JS Where To
JS Variables
JS Operators
JS Functions
JS Conditional
JS Looping
JS Guidelines

JS Advanced
JS String Object
JS Array Object
JS Date Object
JS Math Object
JS Window
JS Form
JS Browser

JS Examples
JS Quiz Test

JS Objects

JS Books

Introduction to JavaScript

JavaScript is a scripting language developed by Netscape.

JavaScript works in all major browsers that are version 3.0 or higher.

What You Should Already Know

Before you continue you should have a basic understanding of the following:

  • WWW, HTML and the basics of building Web pages

If you want to study these subjects first, go to our Home Page.

What is JavaScript?

  • JavaScript is a scripting language
  • A scripting language is a lightweight programming language
  • A JavaScript is lines of executable computer code
  • A JavaScript can be inserted into an HTML page
  • JavaScript is an open scripting language that anyone can use without purchasing a license
  • JavaScript is supported by all major browsers like Netscape and Internet Explorer

How Does it Work?

When a JavaScript is inserted into an HTML document, the Internet browser will read the HTML and interpret the JavaScript. The JavaScript can be executed immediately, or at a later event.

What can a JavaScript Do?

JavaScript gives HTML designers a programming tool

HTML authors are normally not programmers, but since JavaScript is a very light programming language with a very simple syntax, almost anyone can start putting small "snippets" of code into their HTML documents.

JavaScript can put dynamic text into an HTML page

A JavaScript statement like this: document.write("<h1>" + name + "</h1>") can write a variable text into the display of an HTML page, just like the static HTML text: <h1>Bill Gates</h1> does.

JavaScript can react to events

A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element.

JavaScript can read and write HTML elements

A JavaScript can read an HTML element and change the content of an HTML element.

JavaScript can be used to validate data

JavaScripts can be used to validate data in a form before it is submitted to a server. This function is particularly well suited to save the server from extra processing.

JavaScript Joke

Customer: "My browser gives me a JavaScript error. Is JavaScript a dangerous virus?"