JavaScript explained by examples. Widgets and scripts

It is easier to learn a language with interative examples. This tutorial, that is also a reference manual, offers interactive demos for each element of JavaScript.

Summary of the JavaScript programming language
If you know C, Java or PHP, moving to JavaScript is very easy. This page is a reference to help in use of our examples and demos.

JavaScript and C: Inheritance and differences

Variables and constants
Variables are dynamic in JavaScript.

Operators

Array
They are dynamic and have attributes and methods.

Functions
Defining and calling functions.

Control structures
Loops and conditional expressions.

Regular expression
Processing texts with matching rules.

Events

Objects
In JavaScript, they are dynamic, the structure can grow during a processing.

JavaScript and PHP
Sharing variables between PHP and Web pages. Adding variables to that of a form.

Asynchronous JavaScript
How to make JavaScript asynchronous code like that of Analytics from Google?

Harmony, new features in JavaScript
And test of implementation.

JavaScript cheat sheet
The essential in one page.

Forms

Creating and using a form.
Principles and form objects in HTML 4 and HTML 5. Adding a button or an image used as button.

List of all form objects in HTML.

Sending and receiving data depending on form objects
Transmitting data to a web page or a script on the server.

Customizing input text

Checkbox, how to pass the state to another page

Select
Displaying a list of items to select.

HTML Objects

Window
Creating dynamically a window in JavaScript.

Navigator
An object to identify the browser of the user.

Image Map
Links in images.

Lightbox without framework
To build a lightbox and display text or images in a box, only two CSS descriptors are required. And some JavaScript code is added to dynamically change the contents of the box.

Tab Panel without Framework
A simple Tab Panel for a website or an application in CSS, and to insert another page in the same page with a few lines of JavaScript.

Button switching
How to create a two-states button or textual command.

Scoring article
How to implement a system that allows readers to click on an symbol to give an article a score.

Mysterious picture
Replace with a fade effect a text by a picture, so that the picture is displayed only when needed.

Navigation bar
Accessing the pages of an article splitted into several parts.

Bookmarklet tutorial
Adding functions to a webpage with just a link in the page on in the bookmarks. Several examples.


More tutorials
Resources and applications
© 2006-2014 Xul.fr