W3Schools

 

home HOME

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

JS References
JS String Object
JS Array Object
JS Date Object
JS Math Object
JS Window Object
JS Frame Object
JS Form Object
JS Browser Object

Examples/Quiz
JS Examples
JS Quiz

Introduction to JavaScript

previous next

JavaScript is used in millions of Web pages to improve the design, validate forms, and much more. JavaScript was developed by Netscape and is the most popular scripting language on the internet.

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 was designed to add interactivity to HTML pages
  • JavaScript is a scripting language - a scripting language is a lightweight programming language
  • A JavaScript is lines of executable computer code
  • A JavaScript is usually embedded directly in HTML pages
  • JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
  • Everyone can use JavaScript without purchasing a license
  • JavaScript is supported by all major browsers, like Netscape and Internet Explorer

Are Java and JavaScript the same?

NO!

Java and JavaScript are two completely different languages!

Java (developed by Sun Microsystems) is a powerful and very complex programming language - in the same category of languages like C and C++.


What can a JavaScript Do?

  • JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages
  • 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 an HTML page
  • 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 and change the content of an HTML element
  • JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server, this will save the server from extra processing

previous next

Product Spotlight


Want To Be A Web Master?

If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).

Maximum ASP is a service provider with a unique web hosting platform designed specifically for serious Microsoft developers. They offer high performance and stability at a good price with a 30-day, money-back guarantee.

They have access to all of Microsoft's web technologies, and their support staff is 100% Microsoft-certified.

Visit MaximumASP


The PHP Anthology

As a PHP developer, there are certain problems you are almost guaranteed to face. Generating charts and graphs, converting HTML documents to PDF format - PHP can handle all of these, but coming up with the best solution can be tricky!

Now, instead of trawling message boards and mailing lists for the answer, you can just crack open The PHP Anthology!

The PHP Anthology is a complete reference guide for any PHP developer, with over 100 best-practice solutions that any developer will find invaluable when building web sites, intranets, shopping carts or anything else.

Download a free sample now!

Book

We Help You For Free. You Can Help Us!


Jump to: Top of Page or HOME or Printer Friendly Printer friendly page


Search W3Schools:


What Others Say About Us

Does the world know about us? Check out these places:

Google  Yahoo  Alta Vista  MSN  Lycos  Excite  Ask Jeeves  HotBot


W3Schools is for training only. We do not warrant the correctness of the content. The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2004 by Refsnes Data. All Rights Reserved.


Validate How W3Schools was converted to XHTML Validate

ASPHits
Active Server Pages Resource Web Site

WEB HOSTING

$15 Domain Name
Registration
Save $20 / year!



UK Domain Names
Web Hosting
Merkaweb Dominios


Buy UK Domain Names
Register Domain Names


Website Hosting
Domain Hosting
Web Hosting


Cheap Domain Names UK


Domain Names UK
Quality Web Hosting
Webmail & POP3 Email


Web Hosting UK
Dedicated Servers UK
Domain Names UK


Business Web Hosting
Free Web Hosting
Cheap Web Hosting
Web Hosting Reseller


Website Design UK

HOTELS

Amsterdam Hotels
Boston Hotels
Chicago Hotels
London Hotels
Los Angeles Hotels
Miami Hotels
New York Hotels
New Orleans Hotels
Paris Hotels
Rome Hotels
Hotel Reservations


Hotel Directory
Hotel Rooms

Web Building

Website Templates
Website Builder
Flash Templates
Web Templates

Shopping

Garden decor
Online Coupons
Cooking tools
Men & women clothing
Office supply

Software

Student Price Software


Your Own Web Site?

Read W3Schools
Hosting Tutorial


WebDev Books

The Web Design Business Kit Grow Your Web Design Business!

HTML Utopia: Designing Without Tables Using CSS Learn CSS Positioning the easy way!

Build Your Own Database Driven Website Using PHP & MySQL Learn PHP & MySQL the easy way!

SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Security
Web Statistics
Web Standards

Web Quality