JavaScript Tutorial

X

## JS Tutorial

JS HOME JS Introduction JS Where To JS Output JS Syntax JS Statements JS Comments JS Variables JS Data Types JS Objects JS Functions JS Scope JS Events JS Strings JS String Methods JS Numbers JS Number Methods JS Operators JS Math JS Dates JS Date Methods JS Arrays JS Array Methods JS Booleans JS Comparisons JS Conditions JS Switch JS Loop For JS Loop While JS Breaks JS Errors JS RegExp JS Hoisting JS Strict Mode JS Conventions JS Best Practices JS Performance JS Reserved Words JS JSON

## JS Objects

Object Definitions Object Properties Object Prototypes

## JS Functions

Function Definitions Function Parameters Function Invocation Function Closures

## JS HTML DOM

DOM Intro DOM Methods DOM Document DOM Elements DOM HTML DOM CSS DOM Events DOM EventListener DOM Navigation DOM Nodes DOM Nodelist

## JS Browser BOM

JS Window JS Screen JS Location JS History JS Navigator JS Popup Alert JS Timing JS Cookies

## JS Libraries

JS Libraries JS jQuery JS Prototype

## JS Examples

JS Examples I JS Examples II JS HTML DOM JS HTML Input JS HTML Objects JS HTML Events JS Browser JS Quiz JS Certificate JS Summary

## JS References

JavaScript Objects HTML DOM Objects

# JavaScript Tutorial

« W3Schools Home
Next Chapter »

JavaScript is the programming language of the Web.

All modern HTML pages are using JavaScript.

JavaScript is easy to learn.

This tutorial will teach you JavaScript from basic to advanced.

## Try it Yourself Examples in Every Chapter

In every chapter, you can change the examples online, and click on a button to view the result.

## Example

## My First JavaScript Example

Click "Date" to display current day, date, and time.

Try it Yourself »

The smartest way to learn JavaScript, is to study this tutorial, in the sequence listed in the menu on the left.

This sequence allows you to build your knowledge, step by step, in the best educational way.

| You will learn a lot about JavaScript, in a very short time, if you experiment with the code in all the "Try it Yourself" examples.

## Why Study JavaScript?

JavaScript is one of 3 languages all web developers MUST learn:

1. HTML to define the content of web pages
2. CSS to specify the layout of web pages
3. JavaScript to program the behavior of web pages

This tutorial is about JavaScript, and how JavaScript works with HTML and CSS.

## JavaScript Examples

This tutorial contains hundreds of examples!

All examples are "Try it Yourself". You can edit the examples online, and view the result directly.

Hundreds of JavaScript Examples

## JavaScript References

At W3Schools you will find a complete reference of all JavaScript objects, Browser objects, and HTML DOM objects.

The references contain examples for every object, every property, and every method.

Complete JavaScript Reference

## JavaScript Quiz Test

Test your JavaScript skills at W3Schools!

Start JavaScript Quiz!

## JavaScript Exam - Get Your Diploma!

## W3Schools' Online Certification

The perfect solution for professionals who need to balance work, family, and career building.

More than 10 000 certificates already issued!

Get Your Certificate »

The HTML Certificate documents your knowledge of HTML.

The HTML5 Certificate documents your knowledge of advanced HTML5.

The CSS Certificate documents your knowledge of advanced CSS.

The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.

The jQuery Certificate documents your knowledge of jQuery.

The PHP Certificate documents your knowledge of PHP and SQL (MySQL).

The XML Certificate documents your knowledge of XML, XML DOM and XSLT.

The ASP Certificate documents your knowledge of ASP, SQL, and ADO.

« W3Schools Home
Next Chapter »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

UK Reseller Hosting cPanel Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER Free HTML5 Templates

## W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

## SHARE THIS PAGE

## WEB RESOURCES

Web Statistics Web Validation