Cover image for JavaScript: The Definitive Guide, 5th Edition

Book description

This Fifth Edition is completely revised and expanded to cover JavaScript as it is used in today's Web 2.0 applications. This book is both an example-driven programmer's guide and a keep-on-your-desk reference, with new chapters that explain everything you need to know to get the most out of JavaScript, including:

  • Scripted HTTP and Ajax

  • XML processing

  • Client-side graphics using the canvas tag

  • Namespaces in JavaScript--essential when writing complex programs

  • Classes, closures, persistence, Flash, and JavaScript embedded in Java applications

Part I explains the core JavaScript language in detail. If you are new to JavaScript, it will teach you the language. If you are already a JavaScript programmer, Part I will sharpen your skills and deepen your understanding of the language.

Part II explains the scripting environment provided by web browsers, with a focus on DOM scripting with unobtrusive JavaScript. The broad and deep coverage of client-side JavaScript is illustrated with many sophisticated examples that demonstrate how to:

  • Generate a table of contents for an HTML document

  • Display DHTML animations

  • Automate form validation

  • Draw dynamic pie charts

  • Make HTML elements draggable

  • Define keyboard shortcuts for web applications

  • Create Ajax-enabled tool tips

  • Use XPath and XSLT on XML documents loaded with Ajax

  • And much more

Part III is a complete reference for core JavaScript. It documents every class, object, constructor, method, function, property, and constant defined by JavaScript 1.5 and ECMAScript Version 3.

Part IV is a reference for client-side JavaScript, covering legacy web browser APIs, the standard Level 2 DOM API, and emerging standards such as the XMLHttpRequest object and the canvas tag.

More than 300,000 JavaScript programmers around the world have made this their indispensable reference book for building JavaScript applications.

"A must-have reference for expert JavaScript programmers...well-organized and detailed." -- Brendan Eich, creator of JavaScript

Table of Contents

  1. JavaScript: The Definitive Guide
  2. A Note Regarding Supplemental Files
  3. Dedication
  4. Preface
    1. What's New in the Fifth Edition
    2. Using This Book
    3. Conventions Used in This Book
    4. Using Code Examples
    5. Safari® Enabled
    6. How to Contact Us
    7. Acknowledgments
  5. 1. Introduction to JavaScript
    1. 1.1. What Is JavaScript?
      1. 1.1.1. JavaScript Is Not Java
      2. 1.1.2. JavaScript Is Not Simple
    2. 1.2. Versions of JavaScript
    3. 1.3. Client-Side JavaScript
      1. 1.3.1. Client-Side JavaScript Examples
    4. 1.4. JavaScript in Other Contexts
    5. 1.5. Exploring JavaScript
  6. I. Core JavaScript
    1. 2. Lexical Structure
      1. 2.1. Character Set
      2. 2.2. Case Sensitivity
      3. 2.3. Whitespace and Line Breaks
      4. 2.4. Optional Semicolons
      5. 2.5. Comments
      6. 2.6. Literals
      7. 2.7. Identifiers
      8. 2.8. Reserved Words
    2. 3. Datatypes and Values
      1. 3.1. Numbers
        1. 3.1.1. Integer Literals
        2. 3.1.2. Hexadecimal and Octal Literals
        3. 3.1.3. Floating-Point Literals
        4. 3.1.4. Working with Numbers
        5. 3.1.5. Numeric Conversions
        6. 3.1.6. Special Numeric Values
      2. 3.2. Strings
        1. 3.2.1. String Literals
        2. 3.2.2. Escape Sequences in String Literals
        3. 3.2.3. Working with Strings
        4. 3.2.4. Converting Numbers to Strings
        5. 3.2.5. Converting Strings to Numbers
      3. 3.3. Boolean Values
        1. 3.3.1. Boolean Type Conversions
      4. 3.4. Functions
        1. 3.4.1. Function Literals
      5. 3.5. Objects
        1. 3.5.1. Creating Objects
        2. 3.5.2. Object Literals
        3. 3.5.3. Object Conversions
      6. 3.6. Arrays
        1. 3.6.1. Creating Arrays
        2. 3.6.2. Array Literals
      7. 3.7. null
      8. 3.8. undefined
      9. 3.9. The Date Object
      10. 3.10. Regular Expressions
      11. 3.11. Error Objects
      12. 3.12. Type Conversion Summary
      13. 3.13. Primitive Datatype Wrapper Objects
      14. 3.14. Object-to-Primitive Conversion
      15. 3.15. By Value Versus by Reference
        1. 3.15.1. Primitive Types and Reference Types
        2. 3.15.2. Copying and Passing Strings
        3. 3.15.3. Comparing Strings
        4. 3.15.4. By Value Versus by Reference: Summary
    3. 4. Variables
      1. 4.1. Variable Typing
      2. 4.2. Variable Declaration
        1. 4.2.1. Repeated and Omitted Declarations
      3. 4.3. Variable Scope
        1. 4.3.1. No Block Scope
        2. 4.3.2. Undefined Versus Unassigned
      4. 4.4. Primitive Types and Reference Types
      5. 4.5. Garbage Collection
      6. 4.6. Variables as Properties
        1. 4.6.1. The Global Object
        2. 4.6.2. Local Variables: The Call Object
        3. 4.6.3. JavaScript Execution Contexts
      7. 4.7. Variable Scope Revisited
    4. 5. Expressions and Operators
      1. 5.1. Expressions
      2. 5.2. Operator Overview
        1. 5.2.1. Number of Operands
        2. 5.2.2. Type of Operands
        3. 5.2.3. Operator Precedence
        4. 5.2.4. Operator Associativity
      3. 5.3. Arithmetic Operators
      4. 5.4. Equality Operators
        1. 5.4.1. Equality (==) and Identity (===)
        2. 5.4.2. Inequality (!=) and Nonidentity (!==)
      5. 5.5. Relational Operators
        1. 5.5.1. Comparison Operators
        2. 5.5.2. The in Operator
        3. 5.5.3. The instanceof Operator
      6. 5.6. String Operators
      7. 5.7. Logical Operators
        1. 5.7.1. Logical AND (&&)
        2. 5.7.2. Logical OR (||)
        3. 5.7.3. Logical NOT (!)
      8. 5.8. Bitwise Operators
      9. 5.9. Assignment Operators
        1. 5.9.1. Assignment with Operation
      10. 5.10. Miscellaneous Operators
        1. 5.10.1. The Conditional Operator (?:)
        2. 5.10.2. The typeof Operator
        3. 5.10.3. The Object-Creation Operator (new)
        4. 5.10.4. The delete Operator
        5. 5.10.5. The void Operator
        6. 5.10.6. The Comma Operator (,)
        7. 5.10.7. Array and Object Access Operators
        8. 5.10.8. The Function Call Operator
    5. 6. Statements
      1. 6.1. Expression Statements
      2. 6.2. Compound Statements
      3. 6.3. if
      4. 6.4. else if
      5. 6.5. switch
      6. 6.6. while
      7. 6.7. do/while
      8. 6.8. for
      9. 6.9. for/in
      10. 6.10. Labels
      11. 6.11. break
      12. 6.12. continue
      13. 6.13. var
      14. 6.14. function
      15. 6.15. return
      16. 6.16. throw
      17. 6.17. try/catch/finally
      18. 6.18. with
      19. 6.19. The Empty Statement
      20. 6.20. Summary of JavaScript Statements
    6. 7. Objects and Arrays
      1. 7.1. Creating Objects
      2. 7.2. Object Properties
        1. 7.2.1. Enumerating Properties
        2. 7.2.2. Checking Property Existence
        3. 7.2.3. Deleting Properties
      3. 7.3. Objects as Associative Arrays
      4. 7.4. Universal Object Properties and Methods
        1. 7.4.1. The constructor Property
        2. 7.4.2. The toString() Method
        3. 7.4.3. The toLocaleString() Method
        4. 7.4.4. The valueOf() Method
        5. 7.4.5. The hasOwnProperty() Method
        6. 7.4.6. The propertyIsEnumerable() Method
        7. 7.4.7. The isPrototypeOf() Method
      5. 7.5. Arrays
      6. 7.6. Reading and Writing Array Elements
        1. 7.6.1. Adding New Elements to an Array
        2. 7.6.2. Deleting Array Elements
        3. 7.6.3. Array Length
        4. 7.6.4. Iterating Through Arrays
        5. 7.6.5. Truncating and Enlarging Arrays
        6. 7.6.6. Multidimensional Arrays
      7. 7.7. Array Methods
        1. 7.7.1. join()
        2. 7.7.2. reverse()
        3. 7.7.3. sort()
        4. 7.7.4. concat()
        5. 7.7.5. slice()
        6. 7.7.6.. splice()
        7. 7.7.7. push() and pop()
        8. 7.7.8. unshift() and shift()
        9. 7.7.9. toString() and toLocaleString()
        10. 7.7.10. Array Extras
      8. 7.8. Array-Like Objects
    7. 8. Functions
      1. 8.1. Defining and Invoking Functions
        1. 8.1.1. Nested Functions
        2. 8.1.2. Function Literals
        3. 8.1.3. Naming Functions
      2. 8.2. Function Arguments
        1. 8.2.1. Optional Arguments
        2. 8.2.2. Variable-Length Argument Lists: The Arguments Object
          1. 8.2.2.1. The callee Property
        3. 8.2.3. Using Object Properties as Arguments
        4. 8.2.4. Argument Types
      3. 8.3. Functions as Data
      4. 8.4. Functions as Methods
      5. 8.5. Constructor Functions
      6. 8.6. Function Properties and Methods
        1. 8.6.1. The length Property
        2. 8.6.2. The prototype Property
        3. 8.6.3. Defining Your Own Function Properties
        4. 8.6.4. The apply() and call() Methods
      7. 8.7. Utility Function Examples
      8. 8.8. Function Scope and Closures
        1. 8.8.1. Lexical Scoping
        2. 8.8.2. The Call Object
        3. 8.8.3. The Call Object as a Namespace
        4. 8.8.4. Nested Functions as Closures
          1. 8.8.4.1. Closure examples
          2. 8.8.4.2. Closures and memory leaks in Internet Explorer
      9. 8.9. The Function() Constructor
    8. 9. Classes, Constructors, and Prototypes
      1. 9.1. Constructors
      2. 9.2. Prototypes and Inheritance
        1. 9.2.1. Reading and Writing Inherited Properties
        2. 9.2.2. Extending Built-in Types
      3. 9.3. Simulating Classes in JavaScript
        1. 9.3.1. Instance Properties
        2. 9.3.2. Instance Methods
          1. 9.3.2.1. Instance methods and this
        3. 9.3.3. Class Properties
        4. 9.3.4. Class Methods
        5. 9.3.5. Example: A Circle Class
        6. 9.3.6. Example: Complex Numbers
        7. 9.3.7. Private Members
      4. 9.4. Common Object Methods
        1. 9.4.1. The toString( ) Method
        2. 9.4.2. The valueOf( ) Method
        3. 9.4.3. Comparison Methods
      5. 9.5. Superclasses and Subclasses
        1. 9.5.1. Constructor Chaining
        2. 9.5.2. Invoking Overridden Methods
      6. 9.6. Extending Without Inheriting
      7. 9.7. Determining Object Type
        1. 9.7.1. instanceof and constructor
        2. 9.7.2. Object.toString( ) for Object Typing
        3. 9.7.3. Duck Typing
      8. 9.8. Example: A defineClass( ) Utility Method
    9. 10. Modules and Namespaces
      1. 10.1. Creating Modules and Namespaces
        1. 10.1.1. Testing the Availability of a Module
        2. 10.1.2. Classes as Modules
        3. 10.1.3. Module Initialization Code
      2. 10.2. Importing Symbols from Namespaces
        1. 10.2.1. Public and Private Symbols
        2. 10.2.2. Closures as Private Namespace and Scope
      3. 10.3. Module Utilities
    10. 11. Pattern Matching with Regular Expressions
      1. 11.1. Defining Regular Expressions
        1. 11.1.1. Literal Characters
        2. 11.1.2. Character Classes
        3. 11.1.3. Repetition
          1. 11.1.3.1. Nongreedy repetition
        4. 11.1.4. Alternation, Grouping, and References
        5. 11.1.5. Specifying Match Position
        6. 11.1.6. Flags
        7. 11.1.7. Perl RegExp Features Not Supported in JavaScript
      2. 11.2. String Methods for Pattern Matching
      3. 11.3. The RegExp Object
        1. 11.3.1. RegExp Methods for Pattern Matching
        2. 11.3.2. RegExp Instance Properties
    11. 12. Scripting Java
      1. 12.1. Embedding JavaScript
        1. 12.1.1. Type Conversion with javax.script
        2. 12.1.2. Compiling Scripts
        3. 12.1.3. Invoking JavaScript Functions
        4. 12.1.4. Implementing Interfaces in JavaScript
      2. 12.2. Scripting Java
        1. 12.2.1. The JavaPackage Class
        2. 12.2.2. The JavaClass Class
        3. 12.2.3. Importing Packages and Classes
        4. 12.2.4. The JavaObject Class
        5. 12.2.5. Java Methods
          1. 12.2.5.1. Property accessor methods
          2. 12.2.5.2. Overloaded methods
        6. 12.2.6. The JavaArray Class
          1. 12.2.6.1. Creating Java arrays
        7. 12.2.7. Implementing Interfaces with LiveConnect
        8. 12.2.8. LiveConnect Data Conversion
          1. 12.2.8.1. JavaScript conversion of JavaObjects
  7. II. Client-Side JavaScript
    1. 13. JavaScript in Web Browsers
      1. 13.1. The Web Browser Environment
        1. 13.1.1. The Window as Global Execution Context
        2. 13.1.2. The Client-Side Object Hierarchy and the DOM
        3. 13.1.3. The Event-Driven Programming Model
        4. 13.1.4. The Role of JavaScript on the Web
        5. 13.1.5. Unobtrusive JavaScript
      2. 13.2. Embedding Scripts in HTML
        1. 13.2.1. The <script> Tag
        2. 13.2.2. Scripts in External Files
        3. 13.2.3. Specifying the Scripting Language
        4. 13.2.4. The defer Attribute
        5. 13.2.5. The <noscript> Tag
        6. 13.2.6. The </script> Tag
        7. 13.2.7. Hiding Scripts from Old Browsers
        8. 13.2.8. Nonstandard Script Attributes
      3. 13.3. Event Handlers in HTML
      4. 13.4. JavaScript in URLs
        1. 13.4.1. Bookmarklets
      5. 13.5. Execution of JavaScript Programs
        1. 13.5.1. Executing Scripts
        2. 13.5.2. The onload Event Handler
        3. 13.5.3. Event Handlers and JavaScript URLs
        4. 13.5.4. The onunload Event Handler
        5. 13.5.5. The Window Object as Execution Context
        6. 13.5.6. Client-Side JavaScript Threading Model
        7. 13.5.7. Manipulating the Document During Loading
      6. 13.6. Client-Side Compatibility
        1. 13.6.1. The History of Incompatibility
        2. 13.6.2. A Word about "Modern Browsers"
        3. 13.6.3. Feature Testing
        4. 13.6.4. Browser Testing
        5. 13.6.5. Conditional Comments in Internet Explorer
      7. 13.7. Accessibility
      8. 13.8. JavaScript Security
        1. 13.8.1. What JavaScript Can't Do
        2. 13.8.2. The Same-Origin Policy
        3. 13.8.3. Scripting Plug-ins and ActiveX Controls
        4. 13.8.4. Cross-Site Scripting
        5. 13.8.5. Denial-of-Service Attacks
      9. 13.9. Other Web-Related JavaScript Embeddings
    2. 14. Scripting Browser Windows
      1. 14.1. Timers
      2. 14.2. Browser Location and History
        1. 14.2.1. Parsing URLs
        2. 14.2.2. Loading New Documents
        3. 14.2.3. The History Object
      3. 14.3. Obtaining Window, Screen, and Browser Information
        1. 14.3.1. Window Geometry
        2. 14.3.2. The Screen Object
        3. 14.3.3. The Navigator Object
      4. 14.4. Opening and Manipulating Windows
        1. 14.4.1. Opening Windows
        2. 14.4.2. Closing Windows
        3. 14.4.3. Window Geometry
        4. 14.4.4. Keyboard Focus and Visibility
        5. 14.4.5. Scrolling
        6. 14.4.6. Window Methods Example
      5. 14.5. Simple Dialog Boxes
      6. 14.6. Scripting the Status Line
      7. 14.7. Error Handling
      8. 14.8. Multiple Windows and Frames
        1. 14.8.1. Relationships Between Frames
        2. 14.8.2. Window and Frame Names
        3. 14.8.3. JavaScript in Interacting Windows
      9. 14.9. Example: A Navigation Bar in a Frame
    3. 15. Scripting Documents
      1. 15.1. Dynamic Document Content
      2. 15.2. Document Properties
      3. 15.3. Legacy DOM: Document Object Collections
        1. 15.3.1. Naming Document Objects
        2. 15.3.2. Event Handlers on Document Objects
        3. 15.3.3. Legacy DOM Example
      4. 15.4. Overview of the W3C DOM
        1. 15.4.1. Representing Documents as Trees
        2. 15.4.2. Nodes
          1. 15.4.2.1. Types of nodes
          2. 15.4.2.2. Attributes
        3. 15.4.3. The DOM HTML API
          1. 15.4.3.1. HTML naming conventions
        4. 15.4.4. DOM Levels and Features
        5. 15.4.5. DOM Conformance
          1. 15.4.5.1. DOM conformance in Internet Explorer
        6. 15.4.6. Language-Independent DOM Interfaces
      5. 15.5. Traversing a Document
      6. 15.6. Finding Elements in a Document
      7. 15.7. Modifying a Document
        1. 15.7.1. Modifying Attributes
        2. 15.7.2. Working with Document Fragments
      8. 15.8. Adding Content to a Document
        1. 15.8.1. Convenience Methods for Creating Nodes
        2. 15.8.2. The innerHTML Property
      9. 15.9. Example: A Dynamically Created Table of Contents
      10. 15.10. Querying Selected Text
      11. 15.11. The IE 4 DOM
        1. 15.11.1. Traversing a Document
        2. 15.11.2. Finding Document Elements
        3. 15.11.3. Modifying Documents
    4. 16. Cascading Style Sheets and Dynamic HTML
      1. 16.1. Overview of CSS
        1. 16.1.1. Applying Style Rules to Document Elements
        2. 16.1.2. Associating Stylesheets with Documents
        3. 16.1.3. The Cascade
        4. 16.1.4. Versions of CSS
        5. 16.1.5. CSS Example
      2. 16.2. CSS for DHTML
        1. 16.2.1. The Key to DHTML: Absolute Positioning
        2. 16.2.2. CSS Positioning Example: Shadowed Text
        3. 16.2.3. Querying Element Position and Size
        4. 16.2.4. The Third Dimension: z-index
        5. 16.2.5. Element Display and Visibility
        6. 16.2.6. The CSS Box Model and Positioning Details
          1. 16.2.6.1. Internet Explorer quirks
        7. 16.2.7. Color, Transparency, and Translucency
        8. 16.2.8. Partial Visibility: overflow and clip
        9. 16.2.9. Example: Overlapping Translucent Windows
      3. 16.3. Scripting Inline Styles
        1. 16.3.1. Naming Conventions: CSS Attributes in JavaScript
        2. 16.3.2. Working with Style Properties
        3. 16.3.3. Example: CSS Tool Tips
        4. 16.3.4. DHTML Animations
      4. 16.4. Scripting Computed Styles
      5. 16.5. Scripting CSS Classes
      6. 16.6. Scripting Stylesheets
        1. 16.6.1. Enabling and Disabling Stylesheets
        2. 16.6.2. Stylesheet Objects and Stylesheet Rules
    5. 17. Events and Event Handling
      1. 17.1. Basic Event Handling
        1. 17.1.1. Events and Event Types
          1. 17.1.1.1. Device-dependent and device-independent events
        2. 17.1.2. Event Handlers as Attributes
        3. 17.1.3. Event Handlers as Properties
          1. 17.1.3.1. Explicitly invoking event handlers
        4. 17.1.4. Event Handler Return Values
        5. 17.1.5. Event Handlers and the this Keyword
        6. 17.1.6. Scope of Event Handlers
      2. 17.2. Advanced Event Handling with DOM Level 2
        1. 17.2.1. Event Propagation
        2. 17.2.2. Event Handler Registration
        3. 17.2.3. addEventListener( ) and the this Keyword
        4. 17.2.4. Registering Objects as Event Handlers
        5. 17.2.5. Event Modules and Event Types
        6. 17.2.6. Event Interfaces and Event Details
          1. 17.2.6.1. Event
          2. 17.2.6.2. UIEvent
          3. 17.2.6.3. MouseEvent
        7. 17.2.7. Mixing Event Models
      3. 17.3. The Internet Explorer Event Model
        1. 17.3.1. The IE Event Object
        2. 17.3.2. The IE Event Object as a Global Variable
        3. 17.3.3. IE Event-Handler Registration
        4. 17.3.4. Event Bubbling in IE
        5. 17.3.5. Capturing Mouse Events
        6. 17.3.6. attachEvent( ) and the this Keyword
        7. 17.3.7. Event Handlers and Memory Leaks
        8. 17.3.8. Example: Event Model Compatibility for IE
      4. 17.4. Mouse Events
        1. 17.4.1. Converting Mouse Coordinates
        2. 17.4.2. Example: Dragging Document Elements
      5. 17.5. Key Events
        1. 17.5.1. Types of Key Events
        2. 17.5.2. Key Event Details
        3. 17.5.3. Filtering Keyboard Input
        4. 17.5.4. Keyboard Shortcuts with a Keymap
      6. 17.6. The onload Event
      7. 17.7. Synthetic Events
    6. 18. Forms and Form Elements
      1. 18.1. The Form Object
      2. 18.2. Defining Form Elements
      3. 18.3. Scripting Form Elements
        1. 18.3.1. Naming Forms and Form Elements
        2. 18.3.2. Form Element Properties
        3. 18.3.3. Form Element Event Handlers
        4. 18.3.4. Push Buttons
        5. 18.3.5. Toggle Buttons
        6. 18.3.6. Text Fields
        7. 18.3.7. Select and Option Elements
        8. 18.3.8. Hidden Elements
        9. 18.3.9. Fieldset Elements
      4. 18.4. Form Verification Example
    7. 19. Cookies and Client-Side Persistence
      1. 19.1. An Overview of Cookies
      2. 19.2. Storing Cookies
        1. 19.2.1. Cookie Limitations
      3. 19.3. Reading Cookies
      4. 19.4. Cookie Example
      5. 19.5. Cookie Alternatives
        1. 19.5.1. IE userData Persistence
          1. 19.5.1.1. Storing hierarchical data
          2. 19.5.1.2. Storage limits
          3. 19.5.1.3. Sharing persistent data
        2. 19.5.2. Flash SharedObject Persistence
          1. 19.5.2.1. Storage limits
          2. 19.5.2.2. Persistent data sharing
        3. 19.5.3. Example: Persistent Objects
          1. 19.5.3.1. ActionScript code for Flash persistence
      6. 19.6. Persistent Data and Security
    8. 20. Scripting HTTP
      1. 20.1. Using XMLHttpRequest
        1. 20.1.1. Obtaining a Request Object
        2. 20.1.2. Submitting a Request
        3. 20.1.3. Obtaining a Synchronous Response
        4. 20.1.4. Handling an Asynchronous Response
          1. 20.1.4.1. Notes on readyState 3
        5. 20.1.5. XMLHttpRequest Security
      2. 20.2. XMLHttpRequest Examples and Utilities
        1. 20.1.6. Basic GET Utilities
        2. 20.1.7. Getting Headers Only
        3. 20.1.8. HTTP POST
        4. 20.1.9. HTML, XML, and JSON-Encoded Responses
        5. 20.1.10. Timing Out a Request
      3. 20.3. Ajax and Dynamic Scripting
        1. 20.1.11. Ajax Example
        2. 20.1.12. Single-Page Applications
        3. 20.1.13. Remote Scripting
        4. 20.1.14. Ajax Cautions
      4. 20.4. Scripting HTTP with <script> Tags
    9. 21. JavaScript and XML
      1. 21.1. Obtaining XML Documents
        1. 21.1.1. Creating a New Document
        2. 21.1.2. Loading a Document from the Network
        3. 21.1.3. Parsing XML Text
        4. 21.1.4. XML Documents from Data Islands
      2. 21.2. Manipulating XML with the DOM API
        1. 21.2.1. XML Versus HTML DOM
        2. 21.2.2. Example: Creating an HTML Table from XML Data
      3. 21.3. Transforming XML with XSLT
      4. 21.4. Querying XML with XPath
        1. 21.4.1. XPath Examples
        2. 21.4.2. Evaluating XPath Expressions
        3. 21.4.3. More on the W3C XPath API
      5. 21.5. Serializing XML
      6. 21.6. Expanding HTML Templates with XML Data
      7. 21.7. XML and Web Services
      8. 21.8. E4X: ECMAScript for XML
    10. 22. Scripted Client-Side Graphics
      1. 22.1. Scripting Images
        1. 22.1.1. Images and the Level 0 DOM
        2. 22.1.2. Traditional Image Rollovers
        3. 22.1.3. Offscreen Images and Caching
        4. 22.1.4. Unobtrusive Image Rollovers
        5. 22.1.5. Image Animations
        6. 22.1.6. Other Image Properties
      2. 22.2. Graphics with CSS
        1. 22.2.1. Bar Charts with CSS
        2. 22.2.2. A CSSDrawing Class
      3. 22.3. SVG: Scalable Vector Graphics
      4. 22.4. VML: Vector Markup Language
      5. 22.5. Graphics in a <canvas>
      6. 22.6. Graphics with Flash
      7. 22.7. Graphics with Java
        1. 22.7.1. Pie Charts with Java
        2. 22.7.2. Client-Side Sparkline Images with Java
    11. 23. Scripting Java Applets and Flash Movies
      1. 23.1. Scripting Applets
      2. 23.2. Scripting the Java Plug-in
      3. 23.3. Scripting with Java
        1. 23.3.1. Compiling and Deploying Applets That Use JSObject
        2. 23.3.2. Java-to-JavaScript Data Conversion
        3. 23.3.3. The Common DOM API
      4. 23.4. Scripting Flash
        1. 23.4.1. Embedding and Accessing Flash Movies
        2. 23.4.2. Controlling the Flash Player
        3. 23.4.3. Scripting Flash Movies
        4. 23.4.4. Calling JavaScript from Flash
        5. 23.4.5. Example: Flash to JavaScript, and Back to Flash
      5. 23.5. Scripting Flash 8
  8. III. Core JavaScript Reference
    1. 24. Core JavaScript Reference
      1. Sample Entry: how to read these reference pages
      2. arguments[ ]: an array of function arguments
      3. Arguments: arguments and other properties of a function
      4. Arguments.callee: the function that is currently running
      5. Arguments.length: the number of arguments passed to a function
      6. Array: built-in support for arrays
      7. Array.concat( ): concatenate arrays
      8. Array.join( ): concatenate array elements to form a string
      9. Array.length: the size of an array
      10. Array.pop( ): remove and return the last element of an array
      11. Array.push( ): append elements to an array
      12. Array.reverse( ): reverse the elements of an array
      13. Array.shift( ): shift array elements down
      14. Array.slice( ): return a portion of an array
      15. Array.sort( ): sort the elements of an array
      16. Array.splice( ): insert, remove, or replace array elements
      17. Array.toLocaleString( ): convert an array to a localized string
      18. Array.toString( ): convert an array to a string
      19. Array.unshift( ): insert elements at the beginning of an array
      20. Boolean: support for boolean values
      21. Boolean.toString( ): convert a boolean value to a string
      22. Boolean.valueOf( ): the boolean value of a Boolean object
      23. Date: manipulate dates and times
      24. Date.getDate( ): return the day-of-the-month field of a Date
      25. Date.getDay( ): return the day-of-the-week field of a Date
      26. Date.getFullYear( ): return the year field of a Date
      27. Date.getHours( ): return the hours field of a Date
      28. Date.getMilliseconds( ): return the milliseconds field of a Date
      29. Date.getMinutes( ): return the minutes field of a Date
      30. Date.getMonth( ): return the month field of a Date
      31. Date.getSeconds( ): return the seconds field of a Date
      32. Date.getTime( ): return a Date in milliseconds
      33. Date.getTimezoneOffset( ): determine the offset from GMT
      34. Date.getUTCDate( ): return the day-of-the-month field of a Date (universal time)
      35. Date.getUTCDay( ): return the day-of-the-week field of a Date (universal time)
      36. Date.getUTCFullYear( ): return the year field of a Date (universal time)
      37. Date.getUTCHours( ): return the hours field of a Date (universal time)
      38. Date.getUTCMilliseconds( ): return the milliseconds field of a Date (universal time)
      39. Date.getUTCMinutes( ): return the minutes field of a Date (universal time)
      40. Date.getUTCMonth( ): return the month-of-the-year field of a Date (universal time)
      41. Date.getUTCSeconds( ): return the seconds field of a Date (universal time)
      42. Date.getYear( ): return the year field of a Date
      43. Date.parse( ): parse a date/time string
      44. Date.setDate( ): set the day-of-the-month field of a Date
      45. Date.setFullYear( ): set the year and, optionally, the month and date fields of a Date
      46. Date.setHours( ): set the hours, minutes, seconds, and milliseconds fields of a Date
      47. Date.setMilliseconds( ): set the milliseconds field of a Date
      48. Date.setMinutes( ): set the minutes, seconds, and milliseconds fields of a Date
      49. Date.setMonth( ): set the month and day fields of a Date
      50. Date.setSeconds( ): set the seconds and milliseconds fields of a Date
      51. Date.setTime( ): set a Date in milliseconds
      52. Date.setUTCDate( ): set the day-of-the-month field of a Date (universal time)
      53. Date.setUTCFullYear( ): set the year, month, and day fields of a Date (universal time)
      54. Date.setUTCHours( ): set the hours, minutes, seconds, and milliseconds fields of a Date (universal time)
      55. Date.setUTCMilliseconds( ): set the milliseconds field of a Date (universal time)
      56. Date.setUTCMinutes( ): set the minutes, seconds, and milliseconds fields of a Date (universal time)
      57. Date.setUTCMonth( ): set the month and day fields of a Date (universal time)
      58. Date.setUTCSeconds( ): set the seconds and milliseconds fields of a Date (universal time)
      59. Date.setYear( ): set the year field of a Date
      60. Date.toDateString( ): return the date portion of a Date as a string
      61. Date.toGMTString( ): convert a Date to a universal time string
      62. Date.toLocaleDateString( ): return the date portion of a Date as a locally formatted string
      63. Date.toLocaleString( ): convert a Date to a locally formatted string
      64. Date.toLocaleTimeString( ): return the time portion of a Date as a locally formatted string
      65. Date.toString( ): convert a Date to a string
      66. Date.toTimeString( ): return the time portion of a Date as a string
      67. Date.toUTCString( ): convert a Date to a string (universal time)
      68. Date.UTC( ): convert a Date specification to milliseconds
      69. Date.valueOf( ): convert a Date to millisecond representation
      70. decodeURI( ): unescape characters in a URI
      71. decodeURIComponent( ): unescape characters in a URI component
      72. encodeURI( ): escape characters in a URI
      73. encodeURIComponent( ): escape characters in a URI component
      74. Error: a generic exception
      75. Error.message: a human-readable error message
      76. Error.name: the type of an error
      77. Error.toString( ): convert an Error object to a string
      78. escape( ): encode a string
      79. eval( ): execute JavaScript code from a string
      80. EvalError: thrown when eval( ) is used improperly
      81. Function: a JavaScript function
      82. Function.apply( ): invoke a function as a method of an object
      83. Function.arguments[]: arguments passed to a function
      84. Function.call( ): invoke a function as a method of an object
      85. Function.caller: the function that called this one
      86. Function.length: the number of declared arguments
      87. Function.prototype: the prototype for a class of objects
      88. Function.toString( ): convert a function to a string
      89. getClass( ): return the JavaClass of a JavaObject
      90. Global: the global object
      91. Infinity: a numeric property that represents infinity
      92. isFinite( ): determine whether a number is finite
      93. isNaN( ): check for not-a-number
      94. java: the JavaPackage for the java.* package hierarchy
      95. JavaArray: JavaScript representation of a Java array
      96. JavaClass: JavaScript representation of a Java class
      97. JavaObject: JavaScript representation of a Java object
      98. JavaPackage: JavaScript representation of a Java package
      99. JSObject: see JSObject in Part IV
      100. Math: mathematical functions and constants
      101. Math.abs( ): compute an absolute value
      102. Math.acos( ): compute an arccosine
      103. Math.asin( ): compute an arcsine
      104. Math.atan( ): compute an arctangent
      105. Math.atan2( ): compute the angle from the X axis to a point
      106. Math.ceil( ): round a number up
      107. Math.cos( ): compute a cosine
      108. Math.E: the mathematical constant 'e'
      109. Math.exp( ): compute 'e'x
      110. Math.floor( ): round a number down
      111. Math.LN10: the mathematical constant loge2
      112. Math.LN2: the mathematical constant loge10
      113. Math.log( ): compute a natural logarithm
      114. Math.LOG10E: the mathematical constant log2 e
      115. Math.LOG2E: the mathematical constant log10 e
      116. Math.max( ): return the largest argument
      117. Math.min( ): return the smallest argument
      118. Math.PI: the mathematical constant π
      119. Math.pow( ): compute 'x'y
      120. Math.random( ): return a pseudorandom number
      121. Math.round( ): round to the nearest integer
      122. Math.sin( ): compute a sine
      123. Math.sqrt( ): compute a square root
      124. Math.SQRT1_2: the mathematical constant 1/␁
      125. Math.SQRT2: the mathematical constant ␁
      126. Math.tan( ): compute a tangent
      127. NaN: the not-a-number property
      128. Number: support for numbers
      129. Number.MAX_VALUE: the maximum numeric value
      130. Number.MIN_VALUE: the minimum numeric value
      131. Number.NaN: the special not-a-number value
      132. Number.NEGATIVE_INFINITY: negative infinity
      133. Number.POSITIVE_INFINITY: infinity
      134. Number.toExponential( ): format a number using exponential notation
      135. Number.toFixed( ): format a number using fixed-point notation
      136. Number.toLocaleString( ): convert a number to a locally formatted string
      137. Number.toPrecision( ): format the significant digits of a number
      138. Number.toString( ): convert a number to a string
      139. Number.valueOf( ): return the primitive number value
      140. Object: a superclass that contains features of all JavaScript objects
      141. Object.constructor: an object's constructor function
      142. Object.hasOwnProperty( ): check whether a property is inherited
      143. Object.isPrototypeOf( ): is one object the prototype of another?
      144. Object.propertyIsEnumerable( ): will property be seen by a for/in loop?
      145. Object.toLocaleString( ): return an object's localized string representation
      146. Object.toString( ): define an object's string representation
      147. Object.valueOf( ): the primitive value of the specified object
      148. Packages: the root JavaPackage
      149. parseFloat( ): convert a string to a number
      150. parseInt( ): convert a string to an integer
      151. RangeError: thrown when a number is out of its legal range
      152. ReferenceError: thrown when reading a variable that does not exist
      153. RegExp: regular expressions for pattern matching
      154. RegExp.exec( ): general-purpose pattern matching
      155. RegExp.global: whether a regular expression matches globally
      156. RegExp.ignoreCase: whether a regular expression is case-insensitive
      157. RegExp.lastIndex: the starting position of the next match
      158. RegExp.source: the text of the regular expression
      159. RegExp.test( ): test whether a string matches a pattern
      160. RegExp.toString( ): convert a regular expression to a string
      161. String: support for strings
      162. String.charAt( ): get the 'n'th character from a string
      163. String.charCodeAt( ): get the 'n'th character code from a string
      164. String.concat( ): concatenate strings
      165. String.fromCharCode( ): create a string from character encodings
      166. String.indexOf( ): search a string
      167. String.lastIndexOf( ): search a string backward
      168. String.length: the length of a string
      169. String.localeCompare( ): compare one string to another, using locale-specific ordering
      170. String.match( ): find one or more regular-expression matches
      171. String.replace( ): replace substring(s) matching a regular expression
      172. String.search( ): search for a regular expression
      173. String.slice( ): extract a substring
      174. String.split( ): break a string into an array of strings
      175. String.substr( ): extract a substring
      176. String.substring( ): return a substring of a string
      177. String.toLocaleLowerCase( ): convert a string to lowercase
      178. String.toLocaleUpperCase( ): convert a string to uppercase
      179. String.toLowerCase( ): convert a string to lowercase
      180. String.toString( ): return the string
      181. String.toUpperCase( ): convert a string to uppercase
      182. String.valueOf( ): return the string
      183. SyntaxError: thrown to signal a syntax error
      184. TypeError: thrown when a value is of the wrong type
      185. undefined: the undefined value
      186. unescape( ): decode an escaped string
      187. URIError: thrown by URI encoding and decoding methods
  9. IV. Client-Side JavaScript Reference
    1. 25. Client-Side JavaScript Reference
      1. Anchor: the target of a hypertext link
      2. Anchor.focus( ): scroll to make the anchor location visible
      3. Applet: an applet embedded in a web page
      4. Attr: an attribute of a document element
      5. Button: see Input
      6. Canvas: an HTML element for scripted drawing
      7. Canvas.getContext( ): return a context for drawing on the canvas
      8. CanvasGradient: a color gradient for use in a canvas
      9. CanvasGradient.addColorStop( ): add a change of color at some point in the gradient
      10. CanvasPattern: an image-based pattern for use in a Canvas
      11. CanvasRenderingContext2D: the object used for drawing on a canvas
      12. CanvasRenderingContext2D.arc( ): add an arc to the current subpath of a canvas, using a center point and radius
      13. CanvasRenderingContext2D.arcTo( ): add an arc of a circle to the current subpath, using tangent points and a radius
      14. CanvasRenderingContext2D.beginPath( ): start a new collection of subpaths in a canvas
      15. CanvasRenderingContext2D.bezierCurveTo( ): add a cubic Bézier curve to the current subpath
      16. CanvasRenderingContext2D.clearRect( ): erase a rectangular area of a canvas
      17. CanvasRenderingContext2D.clip( ): set the clipping path of a canvas
      18. CanvasRenderingContext2D.closePath( ): closes an open subpath
      19. CanvasRenderingContext2D.createLinearGradient( ): create a linear color gradient
      20. CanvasRenderingContext2D.createPattern( ): create a pattern of tiled images
      21. CanvasRenderingContext2D.createRadialGradient( ): create a radial color gradient
      22. CanvasRenderingContext2D.drawImage( ): draw an image
      23. CanvasRenderingContext2D.fill( ): fill the path
      24. CanvasRenderingContext2D.fillRect( ): fill a rectangle
      25. CanvasRenderingContext2D.globalCompositeOperation: specifies how colors are combined on the canvas
      26. CanvasRenderingContext2D.lineCap: specifies how the ends of lines are rendered
      27. CanvasRenderingContext2D.lineJoin: specifies how vertices are rendered
      28. CanvasRenderingContext2D.lineTo( ): add a straight line to the current subpath
      29. CanvasRenderingContext2D.miterLimit: maximum-miter-length-to-line-width ratio
      30. CanvasRenderingContext2D.moveTo( ): sets the current position and begins a new subpath
      31. CanvasRenderingContext2D.quadraticCurveTo( ): add a quadratic Bezier curve to the current subpath
      32. CanvasRenderingContext2D.rect( ): add a rectangle subpath to the path
      33. CanvasRenderingContext2D.restore( ): reset drawing state to saved values
      34. CanvasRenderingContext2D.rotate( ): rotate the coordinate system of the canvas
      35. CanvasRenderingContext2D.save( ): save a copy of the current graphics state
      36. CanvasRenderingContext2D.scale( ): scale the user coordinate system of the canvas
      37. CanvasRenderingContext2D.stroke( ): draw the current path
      38. CanvasRenderingContext2D.strokeRect( ): draw a rectangle
      39. CanvasRenderingContext2D.translate( ): translate the user coordinate system of the canvas
      40. CDATASection: a CDATA node in an XML document
      41. CharacterData: common functionality for Text and Comment nodes
      42. CharacterData.appendData( ): append a string to a Text or Comment node
      43. CharacterData.deleteData( ): delete characters from a Text or Comment node
      44. CharacterData.insertData( ): insert a string into a Text or Comment node
      45. CharacterData.replaceData( ): replace characters of a Text or Comment node with a string
      46. CharacterData.substringData( ): extract a substring from a Text or Comment node
      47. Checkbox: see Input
      48. Comment: an HTML or XML comment
      49. CSS2Properties: a set of CSS attributes and their values
      50. CSSRule: a rule in a CSS stylesheet
      51. CSSStyleSheet: a CSS stylesheet
      52. CSSStyleSheet.addRule( ): IE-specific method to insert a rule into a stylesheet
      53. CSSStyleSheet.deleteRule( ): delete a rule from a stylesheet
      54. CSSStyleSheet.insertRule( ): insert a rule into a stylesheet
      55. CSSStyleSheet.removeRule( ): IE-specific method to remove a rule from a stylesheet
      56. Document: an HTML or XML document
      57. Document.addEventListener( ): see Element.addEventListener( )
      58. Document.attachEvent( ): see Element.attachEvent( )
      59. Document.createAttribute( ): create a new Attr node
      60. Document.createAttributeNS( ): create an Attr with a name and namespace
      61. Document.createCDATASection( ): create a new CDATASection node
      62. Document.createComment( ): create a new Comment node
      63. Document.createDocumentFragment( ): create a new, empty DocumentFragment node
      64. Document.createElement( ): create a new Element node
      65. Document.createElementNS( ): create a new Element node using a namespace
      66. Document.createEvent( ): create an Event object
      67. Document.createExpression( ): create an XPath expression for later evaluation
      68. Document.createProcessingInstruction( ): create a ProcessingInstruction node
      69. Document.createRange( ): create a Range object
      70. Document.createTextNode( ): create a new Text node
      71. Document.detachEvent( ): see Element.detachEvent( )
      72. Document.dispatchEvent( ): see Element.dispatchEvent( )
      73. Document.evaluate( ): evaluate an XPath expression
      74. Document.getElementById( ): find an element with the specified unique ID
      75. Document.getElementsByTagName( ): return all Element nodes with the specified name
      76. Document.getElementsByTagNameNS( ): return all Element nodes with a specified name and namespace
      77. Document.importNode( ): copy a node from another document for use in this document
      78. Document.loadXML( ): populate this Document by parsing a string of XML markup
      79. Document.removeEventListener( ): see Element.removeEventListener( )
      80. DocumentFragment: adjacent nodes and their subtrees
      81. DocumentType: the DTD of an XML document
      82. DOMException: signal exceptions or errors for core DOM objects
      83. DOMImplementation: methods independent of any particular document
      84. DOMImplementation.createDocument( ): create a new Document and the specified root element
      85. DOMImplementation.createDocumentType( ): create a DocumentType node
      86. DOMImplementation.hasFeature( ): determine whether the implementation supports a feature
      87. DOMParser: parses XML markup to create a Document
      88. DOMParser.parseFromString( ): parse XML markup
      89. Element: an HTML or XML element
      90. Element.addEventListener( ): register an event handler
      91. Element.attachEvent( ): register an event handler
      92. Element.detachEvent( ): delete an event listener
      93. Element.dispatchEvent( ): dispatch a synthetic event to this node
      94. Element.getAttribute( ): return the string value of a named attribute
      95. Element.getAttributeNode( ): return the Attr node for the named attribute
      96. Element.getAttributeNodeNS( ): return the Attr node for an attribute with a namespace
      97. Element.getAttributeNS( ): get the value of an attribute that uses namespaces
      98. Element.getElementsByTagName( ): find descendant elements with a specified tag name
      99. Element.getElementsByTagNameNS( ): return descendant elements with the specified name and namespace
      100. Element.hasAttribute( ): determine whether this element has a specified attribute
      101. Element.hasAttributeNS( ): determine whether this element has a specified attribute
      102. Element.removeAttribute( ): delete a named attribute of an element
      103. Element.removeAttributeNode( ): remove an Attr node from an element
      104. Element.removeAttributeNS( ): delete an attribute specified by name and namespace
      105. Element.removeEventListener( ): delete an event listener
      106. Element.setAttribute( ): create or change an attribute of an element
      107. Element.setAttributeNode( ): add a new Attr node to an Element
      108. Element.setAttributeNodeNS( ): add a namespace Attr node to an Element
      109. Element.setAttributeNS( ): create or change an attribute with a namespace
      110. Event: information about an event
      111. Event.initEvent( ): initialize the properties of a new event
      112. Event.preventDefault( ): cancel default action of an event
      113. Event.stopPropagation( ): do not dispatch an event any further
      114. ExternalInterface: a bidirectional interface to Flash
      115. ExternalInterface.addCallback( ): expose an ActionScript method for execution from JavaScript
      116. ExternalInterface.call( ): call a JavaScript function from ActionScript
      117. FileUpload: see Input
      118. FlashPlayer: plug-in for Flash movies
      119. FlashPlayer.GetVariable( ): return a value defined in a Flash movie
      120. FlashPlayer.GotoFrame( ): skip to the specified frame of a movie
      121. FlashPlayer.IsPlaying( ): check whether a movie is playing
      122. FlashPlayer.LoadMovie( ): load an auxiliary movie
      123. FlashPlayer.Pan( ): move the viewport of the movie
      124. FlashPlayer.PercentLoaded( ): determine how much of the movie has loaded
      125. FlashPlayer.Play( ): play a movie
      126. FlashPlayer.Rewind( ): rewind the movie to its first frame
      127. FlashPlayer.SetVariable( ): set a variable defined by a Flash movie
      128. FlashPlayer.SetZoomRect( ): set the viewport of a movie
      129. FlashPlayer.StopPlay( ): stop the movie
      130. FlashPlayer.TotalFrames( ): return the length of the movie, in frames
      131. FlashPlayer.Zoom( ): zoom in or out
      132. Form: a <form> in an HTML document
      133. Form.elements[]: the input elements of a form
      134. Form.onreset: event handler invoked when a form is reset
      135. Form.onsubmit: event handler invoked when a form is submitted
      136. Form.reset( ): reset the elements of a form to their default values
      137. Form.submit( ): submit form data to a web server
      138. Frame: a <frame> in an HTML document
      139. Hidden: see Input
      140. History: the URL history of the browser
      141. History.back( ): return to the previous URL
      142. History.forward( ): visit the next URL
      143. History.go( ): revisit a URL
      144. HTMLCollection: array of HTML elements accessible by position or name
      145. HTMLCollection.item( ): get an element by position
      146. HTMLCollection.namedItem( ): get an element by name
      147. HTMLDocument: the root of an HTML document tree
      148. HTMLDocument.all[]: all HTML elements in a document
      149. HTMLDocument.close( ): close an open document and display it
      150. HTMLDocument.cookie: the cookie(s) of the document
      151. HTMLDocument.domain: the security domain of a document
      152. HTMLDocument.getElementsByName( ): find elements with the specified name attribute
      153. HTMLDocument.open( ): begin a new document, erasing the current one
      154. HTMLDocument.write( ): append HTML text to an open document
      155. HTMLDocument.writeln( ): append HTML text and a newline to an open document
      156. HTMLElement: an element in an HTML document
      157. HTMLElement.onclick: event handler invoked when the user clicks on an element
      158. HTMLElement.ondblclick: event handler invoked when the user double-clicks on an element
      159. HTMLElement.onkeydown: event handler invoked when the user presses a key
      160. HTMLElement.onkeypress: event handler invoked when the user presses a key
      161. HTMLElement.onkeyup: event handler invoked when the user releases a key
      162. HTMLElement.onmousedown: event handler invoked when the user presses a mouse button
      163. HTMLElement.onmousemove: event handler invoked when the mouse moves within an element
      164. HTMLElement.onmouseout: event handler invoked when mouse moves out of an element
      165. HTMLElement.onmouseover: event handler invoked when the mouse moves over an element
      166. HTMLElement.onmouseup: event handler invoked when the user releases a mouse button
      167. HTMLElement.scrollIntoView( ): make an element visible
      168. IFrame: an <iframe> in an HTML document
      169. Image: an image in an HTML document
      170. Image.onabort: event handler invoked when the user aborts image loading
      171. Image.onerror: event handler invoked when an error occurs during image loading
      172. Image.onload: event handler invoked when an image finishes loading
      173. Input: an input element in an HTML form
      174. Input.blur( ): remove keyboard focus from a form element
      175. Input.click( ): simulate a mouse click on a form element
      176. Input.focus( ): give keyboard focus to a form element
      177. Input.onblur: the handler invoked when a form element loses focus
      178. Input.onchange: event handler invoked when a form element's value changes
      179. Input.onclick: event handler invoked when a form element is clicked
      180. Input.onfocus: event handler invoked when a form element gains focus
      181. Input.select( ): select the text in a form element
      182. JavaArray, JavaClass, JavaObject, JavaPackage: see Part III
      183. JSObject: Java representation of a JavaScript object
      184. JSObject.call( ): invoke a method of a JavaScript object
      185. JSObject.eval( ): evaluate a string of JavaScript code
      186. JSObject.getMember( ): read a property of a JavaScript object
      187. JSObject.getSlot( ): read an array element of a JavaScript object
      188. JSObject.getWindow( ): return initial JSObject for browser window
      189. JSObject.removeMember( ): delete a property of a JavaScript object
      190. JSObject.setMember( ): set a property of a JavaScript object
      191. JSObject.setSlot( ): set an array element of a JavaScript object
      192. JSObject.toString( ): return the string value of a JavaScript object
      193. KeyEvent: details about a keyboard event
      194. Layer: an obsolete Netscape API
      195. Link: a hyperlink or anchor in an HTML document
      196. Link.blur( ): take keyboard focus away from a hyperlink
      197. Link.focus( ): make a link visible and give it keyboard focus
      198. Link.onclick: event handler invoked when a Link is clicked
      199. Link.onmouseout: event handler invoked when the mouse leaves a link
      200. Link.onmouseover: event handler invoked when the mouse goes over a link
      201. Location: represents and controls browser location
      202. Location.reload( ): reload the current document
      203. Location.replace( ): replace one displayed document with another
      204. MimeType: represents a MIME datatype
      205. MouseEvent: details about a mouse event
      206. MouseEvent.initMouseEvent( ): initialize the properties of a MouseEvent object
      207. Navigator: information about the browser in use
      208. Navigator.javaEnabled( ): test whether Java is available
      209. Node: a node in a document tree
      210. Node.appendChild( ): insert a node as the last child of this node
      211. Node.cloneNode( ): duplicate a node and, optionally, all of its descendants
      212. Node.hasAttributes( ): determine whether a node has attributes
      213. Node.hasChildNodes( ): determine whether a node has children
      214. Node.insertBefore( ): insert a node into the document tree before the specified node
      215. Node.isSupported( ): determine if a node supports a feature
      216. Node.normalize( ): merge adjacent Text nodes and remove empty ones
      217. Node.removeChild( ): remove (and return) the specified child of this node
      218. Node.replaceChild( ): replace a child node with a new node
      219. Node.selectNodes( ): select nodes with an XPath query
      220. Node.transformNode( ): transform a node to a string using XSLT
      221. Node.transformNodeToObject( ): transform a node to a document using XSLT
      222. NodeList: a read-only array of nodes
      223. NodeList.item(): get an element of a NodeList
      224. Option: an option in a Select element
      225. Packages: see Packages in Part III
      226. Password: see Input
      227. Plugin: describes an installed plug-in
      228. ProcessingInstruction : a processing instruction in an XML document
      229. Radio: see Input
      230. Range: represents a contiguous range of a document
      231. Range.cloneContents(): copy range contents into a DocumentFragment
      232. Range.cloneRange(): make a copy of this range
      233. Range.collapse(): make one boundary point equal to the other
      234. Range.compareBoundaryPoints(): compare positions of two ranges
      235. Range.deleteContents(): delete a region of the document
      236. Range.detach(): free a Range object
      237. Range.extractContents( ): delete document content and return it in a DocumentFragment
      238. Range.insertNode( ): insert a node at the start of a range
      239. Range.selectNode(): set range boundaries to a node
      240. Range.selectNodeContents( ): set range boundaries to the children of a node
      241. Range.setEnd( ): set the end point of a range
      242. Range.setEndAfter( ): end a range after a specified node
      243. Range.setEndBefore( ): end a range before the specified node
      244. Range.setStart( ): set the start point of a range
      245. Range.setStartAfter( ): start a range after the specified node
      246. Range.setStartBefore( ): start a range before the specified node
      247. Range.surroundContents( ): surround range contents with the specified node
      248. Range.toString( ): get range contents as a plain-text string
      249. RangeException: signals a range-specific exception
      250. Reset: see Input
      251. Screen: provides information about the display
      252. Select: a graphical selection list
      253. Select.add( ): insert an <option> element
      254. Select.blur( ): take keyboard focus away from this element
      255. Select.focus( ): give keyboard focus to this element
      256. Select.onchange: event handler invoked when the selection changes
      257. Select.options[]: the choices in a Select object
      258. Select.remove( ): remove an <option>
      259. Style: see CSS2Properties
      260. Submit: see Input
      261. Table: a <table> in an HTML document
      262. Table.createCaption( ): get or create a <caption>
      263. Table.createTFoot( ): get or create a <tfoot>
      264. Table.createTHead( ): get or create a <thead>
      265. Table.deleteCaption( ): delete the <caption> of a table
      266. Table.deleteRow( ): delete a row of a table
      267. Table.deleteTFoot( ): delete the <tfoot> of a table
      268. Table.deleteTHead( ): delete the <thead> of a table
      269. Table.insertRow( ): add a new, empty row to the table
      270. TableCell: cell in an HTML table
      271. TableRow: a <tr> element in an HTML table
      272. TableRow.deleteCell( ): delete a cell in a table row
      273. TableRow.insertCell( ): insert a new, empty <td> element into a table row
      274. TableSection: a header, footer, or body section of a table
      275. TableSection.deleteRow( ): delete a row within a table section
      276. TableSection.insertRow( ): insert a new, empty row into this table section
      277. Text: a run of text in an HTML or XML document
      278. Text.splitText( ): split a Text node in two
      279. Textarea: a multiline text input area
      280. Textarea.blur( ): take keyboard focus away from this element
      281. Textarea.focus( ): give keyboard focus to this element
      282. Textarea.onchange: event handler invoked when input value changes
      283. Textarea.select( ): select the text in this element
      284. TextField: see Input
      285. UIEvent: details about user-interface events
      286. UIEvent.initUIEvent( ): initialize the properties of a UIEvent object
      287. Window: a web browser window or frame
      288. Window.addEventListener( ): see Element.addEventListener( )
      289. Window.alert( ): display a message in a dialog box
      290. Window.attachEvent( ): see Element.attachEvent( )
      291. Window.blur( ): remove keyboard focus from a top-level window
      292. Window.clearInterval( ): stop periodically executing code
      293. Window.clearTimeout( ): cancel deferred execution
      294. Window.close( ): close a browser window
      295. Window.confirm( ): ask a yes-or-no question
      296. Window.defaultStatus: the default status line text
      297. Window.detachEvent( ): see Element.detachEvent( )
      298. Window.focus( ): give keyboard focus to a window
      299. Window.getComputedStyle( ): retrieve the CSS styles used to render an element
      300. Window.moveBy( ): move a window to a relative position
      301. Window.moveTo( ): move a window to an absolute position
      302. Window.onblur: event handler invoked when the window loses keyboard focus
      303. Window.onerror: error handler invoked when a JavaScript error occurs
      304. Window.onfocus: event handler invoked when a window is given focus
      305. Window.onload: event handler invoked when a document finishes loading
      306. Window.onresize: event handler invoked when a window is resized
      307. Window.onunload: the handler invoked when the browser leaves a page
      308. Window.open( ): open a new browser window or locate a named window
      309. Window.print( ): print the document
      310. Window.prompt( ): get user input with a dialog box
      311. Window.removeEventListener( ): see Element.removeEventListener( )
      312. Window.resizeBy( ): resize a window by a relative amount
      313. Window.resizeTo( ): resize a window
      314. Window.scrollBy( ): scroll the document by a relative amount
      315. Window.scrollTo( ): scroll the document
      316. Window.setInterval( ): periodically execute specified code
      317. Window.setTimeout( ): defer execution of code
      318. Window.status: specify a transient status-line message
      319. XMLHttpRequest: An HTTP request and response
      320. XMLHttpRequest.abort( ): cancel an HTTP request
      321. XMLHttpRequest.getAllResponseHeaders( ): return unparsed HTTP response headers
      322. XMLHttpRequest.getResponseHeader( ): get the value of a named HTTP response header
      323. XMLHttpRequest.onreadystatechange: event handler function invoked when readyState changes
      324. XMLHttpRequest.open( ): initialize HTTP request parameters
      325. XMLHttpRequest.send( ): send an HTTP request
      326. XMLHttpRequest.setRequestHeader( ): add a HTTP request header to the request
      327. XMLSerializer: serializes XML documents and nodes
      328. XMLSerializer.serializeToString( ): convert an XML document or node to a string
      329. XPathExpression: a compiled XPath query
      330. XPathExpression.evaluate( ): evaluate a compiled XPath query
      331. XPathResult: the result of an XPath query
      332. XPathResult.iterateNext( ): return the next node that matches an XPath query
      333. XPathResult.snapshotItem( ): return a node that matches an XPath query
      334. XSLTProcessor: transform XML with XSLT stylesheets
      335. XSLTProcessor.clearParameters( ): delete all stylesheet parameter values
      336. XSLTProcessor.getParameter( ): return the value of a named parameter
      337. XSLTProcessor.importStylesheet( ): specify an XSLT stylesheet for transformations
      338. XSLTProcessor.removeParameter( ): delete a parameter value
      339. XSLTProcessor.reset( ): restore an XSLTProcessor to its default state
      340. XSLTProcessor.setParameter( ): set a stylesheet parameter
      341. XSLTProcessor.transformToDocument( ): transform a node or document to a new document
      342. XSLTProcessor.transformToFragment( ): transform a node or document to a DocumentFragment
  10. About the Author
  11. Colophon
  12. Copyright