Learning JavaScript
By
Shelley Powers
October 2006
Pages: 351
| Table of Contents
| Index
| Colophon
Table of Contents
-
Chapter 1 Introduction and First Looks
-
Twisted History: Specs and Implementations
-
Cross-Browser Incompatibility and Other Common JavaScript
Myths
-
What You Can Do with JavaScript
-
First Look at JavaScript: “Hello World!”
-
The JavaScript Sandbox
-
Accessibility and JavaScript Best Practices
-
Chapter 2 JavaScript Data Types and Variables
-
Identifying Variables
-
Scope
-
Simple Types
-
Constants: Named but Not Variables
-
Questions
-
Chapter 3 Operators and Statements
-
Format of a JavaScript Statement
-
Simple Statements
-
Conditional Statements and Program Flow
-
The Conditional Operators
-
The Logical Operators
-
Advanced Statements: The Loops
-
Questions
-
Chapter 4 The JavaScript Objects
-
The Object Constructor
-
The Number Object
-
The String Object
-
Regular Expressions and RegExp
-
Purposeful Objects: Date and Math
-
JavaScript Arrays
-
Associative Arrays: The Arrays That Aren’t
-
Questions
-
Chapter 5 Functions
-
Defining a Function: Let Me Count the Ways
-
Callback Functions
-
Functions and Recursion
-
Nested Functions, Function Closure, and Memory Leaks
-
Function As Object
-
Questions
-
Chapter 6 Catching Events
-
The Event Handler at DOM Level 0
-
Questions
-
Chapter 7 Forms and JiT Validation
-
Accessing the Form
-
Attaching Events to Forms: Different Approaches
-
Selection
-
Radio Buttons and Checkboxes
-
Input Fields and JiT Regular Expressions
-
Questions
-
Chapter 8 The Sandbox and Beyond: Cookies, Connectivity, and Piracy
-
The Sandbox
-
All About Cookies
-
Alternative Storage Techniques
-
Cross-Site Scripting (XSS)
-
Questions
-
Chapter 9 The Basic Browser Objects
-
BOM at a Glance
-
The window Object
-
Frames and Location
-
history, screen, and navigator
-
The all Collection, Inner/Outer HTML and Text, and Old and New
Documents
-
Something Old, Something New
-
Questions
-
Chapter 10 DOM: The Document Object Model
-
A Tale of Two Interfaces
-
The DOM and Compliant Browsers
-
The DOM HTML API
-
Understanding the DOM: The Core API
-
The DOM Core Document Object
-
Element and Access in Context
-
Modifying the Tree
-
Questions
-
Chapter 11 Creating Custom JavaScript Objects
-
The JavaScript Object and Prototyping
-
Creating Your Own Custom JavaScript Objects
-
Object Detection, Encapsulation, and Cross-Browser
Objects
-
Chaining Constructors and JS Inheritance
-
One-Off Objects
-
Advanced Error-Handling Techniques (try, throw, catch)
-
What’s New in JavaScript
-
Questions
-
Chapter 12 Building Dynamic Web Pages: Adding Style to Your Script
-
DHTML: JavaScript, CSS, and DOM
-
Fonts and Text
-
Position and Movement
-
Size and Clipping
-
Display, Visibility, and Opacity
-
Questions
-
Chapter 13 Moving Outside the Page with Ajax
-
Ajax: It’s Not Only Code
-
How Ajax Works
-
Hello Ajax World!
-
The Ajax Object: XMLHttpRequest and IE’s ActiveX Objects
-
Working with XML—or Not
-
Google Maps
-
Questions
-
Chapter 14 Good News: Juicy Libraries! Amazing Web Services! Fun APIs!
-
Before Jumping In, A Word of Caution
-
Working with Prototype
-
Script.aculo.us: More Than the Sum of Its Periods
-
Sabre’s Rico
-
Dojo
-
The Yahoo! UI
-
MochiKit
-
Questions
-
Appendix 1 Answers
-
Chapter 2
-
Chapter 3
-
Chapter 4
-
Chapter 5
-
Chapter 6
-
Chapter 7
-
Chapter 8
-
Chapter 9
-
Chapter 10
-
Chapter 11
-
Chapter 12
-
Chapter 13
-
Chapter 14
Return to Learning JavaScript