Chapter 10

Learning JavaScript

What You Will Learn in This Chapter

  • How to start with programming JavaScript
  • How the Document Object Model enables you to access and manipulate HTML elements
  • How to apply logic to your JavaScript programs
  • How to loop through collections of information with JavaScript
  • How to work with dates, math, and other built-in JavaScript features Code Downloads for this Chapter

You can find the code downloads for this chapter at on the Download Code tab. The code is in the Chapter 10 download and individually named according to the names throughout the chapter.

Many programming languages exist today, and in this chapter, you begin learning the basics of a programming language called JavaScript. JavaScript is by far the most common programming language used on web pages. jQuery, a framework created to make working with JavaScript easier and more fun, is the most popular way to work with JavaScript on the web.

Although you can’t learn everything there is to learn about jQuery and JavaScript in this book, many free jQuery resources are on the web that you can use today to enhance your pages. Therefore, the aim of this chapter is to teach you enough to start using these scripts in your web pages and to understand how they work. You can customize these scripts and write some basic scripts of your own based upon what you learn in this chapter. In addition, this is a good introduction to general programming ...

Get Beginning HTML and CSS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.