Buying Options
Learning JavaScript, Second Edition
Print $34.99
Add to Cart
Print+Ebook $38.49
Add to Cart
Ebook $27.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £26.99
Add to Cart
What is this?

Product Editions

  1. Learning JavaScript, Second Edition - December 2008
  2. Learning JavaScript - October 2006
Description
Packed with best practices and examples of JavaScript use, Learning JavaScript provides complete, no-nonsense coverage of this quirky yet essential language for web development. You'll learn everything from primitive data types to complex features, including JavaScript elements involved with Ajax and dynamic page effects. By the end of the book, you'll be able to work with even the most sophisticated libraries and web applications.
Full Description
Table of Contents
  1. Chapter 1 Hello JavaScript!

    1. Hello World!

    2. Hello World! Once Again

    3. JavaScript Files

    4. Accessibility and JavaScript Best Practices

  2. Chapter 2 JavaScript Data Types and Variables

    1. Identifying Variables

    2. Primitive Types

    3. The String Data Type

    4. The Boolean Data Type

    5. The Number Data Type

    6. The null and undefined Variables

    7. Constants: Named but Not Variables

    8. Test Your Knowledge: Quiz

    9. Test Your Knowledge: Answers

  3. Chapter 3 Operators and Statements

    1. The Format of a JavaScript Statement

    2. The Assignment Statement

    3. Conditional Statements and Program Flow

    4. The Conditional Operators

    5. The Logical Operators

    6. Advanced Statements: The Loops

    7. Test Your Knowledge: Quiz

    8. Test Your Knowledge: Answers

  4. Chapter 4 The JavaScript Objects

    1. Primitive Data Types As Objects

    2. Boolean, Number, and String

    3. Regular Expressions and RegExp

    4. The Date Object

    5. The Math Object

    6. JavaScript Arrays

    7. Test Your Knowledge: Quiz

    8. Test Your Knowledge: Answers

  5. Chapter 5 Functions

    1. Declarative Functions

    2. Anonymous Functions

    3. Function Literals

    4. Function Type Summary

    5. Function Scope

    6. Function As Object

    7. Test Your Knowledge: Quiz

    8. Test Your Knowledge: Answers

  6. Chapter 6 Troubleshooting, Debugging, and Cross-Browser Issues

    1. Simple Ways to Debug

    2. Development and Debugging Tools by Browser

    3. Dealing with Cross-Browser Differences

    4. Test Your Knowledge: Quiz

    5. Test Your Knowledge: Answers

  7. Chapter 7 Catching Events

    1. The Events

    2. Level 0 Event Handling

    3. The DOM Level 2 Event Model

    4. Test Your Knowledge: Quiz

    5. Test Your Knowledge: Answers

  8. Chapter 8 Forms, Form Events, and Validation

    1. Attaching Events to Forms: Different Approaches

    2. Selection

    3. Radio Buttons and Checkboxes

    4. The text, textarea, password, and hidden Input Elements

    5. Input Fields and Regular Expression Validation

    6. Forms, the Sandbox, and XSS

    7. Test Your Knowledge: Quiz

    8. Test Your Knowledge: Answers

  9. Chapter 9 Browser As Puzzle Box

    1. The Structure of the Browser at a Glance

    2. The window Object

    3. Creating and Controlling Windows

    4. Frames

    5. Adding and Controlling Timers

    6. The history, screen, and navigator Objects

    7. The Document Object

    8. innerHTML

    9. Test Your Knowledge: Quiz

    10. Test Your Knowledge: Answers

  10. Chapter 10 Cookies and Other Client-Side Storage Techniques

    1. The JavaScript Sandbox and Cookie Security

    2. All About Cookies

    3. Flash Shared Objects, Google Gears, and HTML5 DOM Storage

    4. Test Your Knowledge: Quiz

    5. Test Your Knowledge: Answers

  11. Chapter 11 The DOM, or Web Page As Tree

    1. A Tale of Two Interfaces

    2. The DOM HTML API

    3. Understanding the DOM: The Core API

    4. Element and Access in Context

    5. Modifying the Tree

    6. Test Your Knowledge: Quiz

    7. Test Your Knowledge: Answers

  12. Chapter 12 Dynamic Pages

    1. JavaScript, CSS, and the DOM

    2. Fonts and Text

    3. Position and Movement

    4. Size and Clipping

    5. Display, Visibility, and Opacity

    6. Revisiting the DOM: Collapsing Forms, Query Selectors, and Class Names

    7. Test Your Knowledge: Quiz

    8. Test Your Knowledge: Answers

  13. Chapter 13 Creating Custom JavaScript Objects

    1. The JavaScript Object and Prototyping

    2. Creating Your Own Custom JavaScript Objects

    3. Object Encapsulation

    4. Chaining Constructors and JavaScript Inheritance

    5. One-Off Objects

    6. Object Libraries: Packaging Your Objects for Reuse

    7. Advanced Error Handling Techniques (try, throw, catch)

    8. Test Your Knowledge: Quiz

    9. Test Your Knowledge: Answers

  14. Chapter 14 Moving Outside the Page with Ajax

    1. How Ajax Works

    2. Hello Ajax World!

    3. The XMLHttpRequest Object and Preparing to Send the Request

    4. Processing the Web Request Return

    5. Ajax: It’s Not Only Code

    6. JavaScript and Ajax Libraries

    7. Test Your Knowledge: Quiz

    8. Test Your Knowledge: Answers

  15. Chapter 15 Ajax Data: XML or JSON?

    1. XML-Formatted Ajax Results

    2. JavaScript Object Notation

    3. Test Your Knowledge: Quiz

    4. Test Your Knowledge: Answers

  1. Colophon

View Full Table of Contents
Product Details
Title:
Learning JavaScript, Second Edition
By:
Shelley Powers
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
December 2008
Ebook Release:
December 2008
Pages:
400
Print ISBN:
978-0-596-52187-5
| ISBN 10:
0-596-52187-1
Ebook ISBN:
978-0-596-15734-0
| ISBN 10:
0-596-15734-7
Customer Reviews
About the Author
  1. Shelley Powers

    Shelley Powers has been working with, and writing about, web technologies--from the first release of JavaScript to the latest graphics and design tools--for more than 12 years. Her recent O'Reilly books have covered the semantic web, Ajax, JavaScript, and web graphics. She's an avid amateur photographer and web development aficionado, who enjoys applying her latest experiments on her many web sites.

    View Shelley Powers's full profile page.

Colophon

The animal on the cover of Learning JavaScript, Second Edition, is a baby black, or hook-lipped, rhinoceros (Diceros bicornis). The black rhino is one of two African species of rhinos. Weighing up to one and a half tons, it is smaller than its counterpart-the white, or square-lipped, rhinoceros. Black rhinos live in savanna grasslands, open woodlands, and mountain forests in a few small areas of southwestern, south central, and eastern Africa. They prefer to live alone and will aggressively defend their territory.

With an upper lip that tapers to a hooklike point, the black rhino is perfectly suited to pluck leaves, twigs, and buds from trees and bushes. It is able to eat coarser vegetation than other herbivores.

Black rhinos are odd-toed ungulates, meaning they have three toes on each foot. They have thick, gray, hairless hides. Among the most distinctive of the rhino's features is its two horns, which are actually made of thickly matted hair rather than bone. The rhino uses its horns to defend itself against lions, tigers, and hyenas, or to claim a female mate. The courtship ritual is often violent, and the horns can inflict severe wounds.

After mating, the female and male rhinos have no further contact. The gestation period is 14 to 18 months, and the calves nurse for a year, though they are able to eat vegetation almost immediately after birth. The bond between a mother and her calf can last up to four years before the calf leaves its home.

In recent years, rhinos have been hunted to the point of near extinction. Scientists estimate that there may have been as many as a million black rhinos in Africa 100 years ago, a number that has dwindled to 2,400 today. All five remaining species, which include the Indian, Javan, and Sumatran rhinos, are now endangered. Humans are considered their biggest predators.

The cover image is from Cassell's Natural History. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSansMonoCondensed.

  • Book cover of Learning JavaScript