Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1. A copy of the license is included in the section entitled “GNU Free Documentation License”
- What is JavaScript?
- JavaScript allows you to create ‘dynamic, interactive’ web pages: web pages that do things in response to what your readers do, without having a separate page for each possible response. In this tutorial, I’m going to cover some of the very basics of using JavaScript in your web pages. I’m going to assume that you know a little bit about HTML, but nothing about programming or JavaScript. If you aren’t familiar with HTML, you’ll want to go over…
- Intercepting Clicks
- JavaScript turns every web page into a collection of objects that you can modify and interact with. JavaScript turns everything that the visitor does into events that you can modify and intercept.
- An image gallery
- One common use of web pages is to display images, with one image per page. Normally the page doesn’t change except for the image. JavaScript can help speed things up, by not reloading anything except for the new image.
- JavaScript for Beginners: Menu form
- JavaScript is often used in forms to provide feedback and guidance to the person filling out the form. Open “menu.html” in your browser, and think about what we might do to make this form easier to use. Note that because this is a tutorial about JavaScript and not about server-side code, form submission is disabled. One thing you can do to test it out is replace the javascript block in the form’s “action” attribute with “mailto:youremail”. When…
- JavaScript Issues
- JavaScript Issues in JavaScript for Beginners
- Programming Tips
- Programming Tips in JavaScript for Beginners
- More Information
- The most useful book I’ve seen for JavaScript programmers is JavaScript: The Definitive Guide, from O’Reilly. Nowadays I tend to use the web more often, however. Some of the web pages I’ve used while writing this tutorial are the w3schools HTML DOM pages at http://www.w3schools.com/HTMLDOM/ and Daniel Crook’s JavaScript DOM pages at http://krook.org/jsdom/.
- JavaScript for Beginners (full HTML) (129.0 KB)
- HTML version of JavaScript for Beginners
- JavaScript for Beginners (full PDF) (5.5 MB)
- PDF version of JavaScript for Beginners
- JavaScript for Beginners (full RTF) (5.1 MB)
- RTF version of JavaScript for Beginners
- ZIP Resources for JavaScript for Beginners (13.6 MB)
- Resources for JavaScript for Beginners, including samples and document graphics.