You are previewing JavaScript Pocket Reference, 2nd Edition.
O'Reilly logo
JavaScript Pocket Reference, 2nd Edition

Book Description

JavaScript--the powerful, object-based scripting language that can be embedded directly into HTML pages--has earned its place in the web developer's toolkit, to the extent that it's now considered required knowledge for web developers. You can use JavaScript to create dynamic, interactive applications that run completely within a web browser. JavaScript is also the language of choice for developing Dynamic HTML content. Because its syntax is based on the popular programming languages C, C++, and Java, JavaScript is familiar and easy to learn for experienced programmers. At the same time, it's an interpreted scripting language, providing a flexible, forgiving programming environment for new programmers. The JavaScript Pocket Reference, 2nd Edition, provides a complete overview of the core JavaScript language and client-side scripting environment, as well as quick-reference material on core and client-side objects, methods, and properties. The new edition has been revised to cover JavaScript 1.5, and is particularly useful for developers working with the standards-compliant web browsers, such as Internet Explorer 6, Netscape 7, and Mozilla. Ideal as an introduction for beginners and a quick reference for advanced developers, this pocket-sized book is easy to take anywhere and serves as the perfect companion volume to the bestselling JavaScript: The Definitive Guide, 4th Edition. O'Reilly's Pocket References have become a favorite among developers everywhere. By providing a wealth of important details in a concise, well-organized format, these handy books deliver just what you need to complete the task at hand. When you've reached a sticking point and need to get to the answer quickly, the new JavaScript Pocket Reference is the book you'll want close at hand.

Table of Contents

  1. JavaScript Pocket Reference, 2nd Edition
  2. 1. The JavaScript Language
    1. 1.1. Syntax
      1. 1.1.1. Case sensitivity
      2. 1.1.2. Whitespace
      3. 1.1.3. Semicolons
      4. 1.1.4. Comments
      5. 1.1.5. Identifiers
      6. 1.1.6. Keywords
    2. 1.2. Variables
    3. 1.3. Data Types
      1. 1.3.1. Numbers
      2. 1.3.2. Booleans
      3. 1.3.3. Strings
      4. 1.3.4. Objects
      5. 1.3.5. Arrays
      6. 1.3.6. Functions and methods
      7. 1.3.7. null and undefined
    4. 1.4. Expressions and Operators
    5. 1.5. Statements
      1. 1.5.1. Expression statements
      2. 1.5.2. Compound statements
      3. 1.5.3. Empty statements
      4. 1.5.4. Labeled statements
      5. 1.5.5. Alphabetical statement reference
    6. 1.6. Object-Oriented JavaScript
    7. 1.7. Regular Expressions
      1. 1.7.1. Literal characters
      2. 1.7.2. Character classes
      3. 1.7.3. Repetition
      4. 1.7.4. Grouping and alternation
      5. 1.7.5. Anchoring match position
    8. 1.8. Versions of JavaScript
  3. 2. Client-side JavaScript
    1. 2.1. JavaScript in HTML
      1. 2.1.1. The <script> tag
      2. 2.1.2. Event handlers
      3. 2.1.3. JavaScript URLs
    2. 2.2. The Window Object
      1. 2.2.1. Simple dialog boxes
      2. 2.2.2. The status line
      3. 2.2.3. Timers
      4. 2.2.4. System information
      5. 2.2.5. Browser navigation
      6. 2.2.6. Window control
      7. 2.2.7. Multiple windows and frames
    3. 2.3. The Document Object
    4. 2.4. The Legacy DOM
      1. 2.4.1. Dynamically generated documents
      2. 2.4.2. Dynamic forms
      3. 2.4.3. Form validation
      4. 2.4.4. Image rollovers
      5. 2.4.5. Working with cookies
    5. 2.5. The W3C DOM
      1. 2.5.1. Finding elements by ID
      2. 2.5.2. Finding elements by tag name
      3. 2.5.3. Traversing a document tree
      4. 2.5.4. Node types
      5. 2.5.5. HTML attributes
      6. 2.5.6. Manipulating document elements
      7. 2.5.7. Changing document text
      8. 2.5.8. Changing document structure
    6. 2.6. IE 4 DOM
      1. 2.6.1. Accessing document elements
      2. 2.6.2. Traversing the document tree
      3. 2.6.3. Modifying document content and structure
      4. 2.6.4. DOM compatibility
    7. 2.7. DHTML: Scripting CSS Styles
    8. 2.8. Events and Event Handling
      1. 2.8.1. Event handlers as JavaScript functions
      2. 2.8.2. Advanced event handling
    9. 2.9. JavaScript Security Restrictions
  4. 3. JavaScript API Reference
    1. Anchor
    2. Applet
    3. Arguments
    4. Array
    5. Attr
    6. Boolean
    7. Comment
    8. DOMException
    9. DOMImplementation
    10. Date
    11. Document
    12. DocumentFragment
    13. Element
    14. Error
    15. Event
    16. Form
    17. Function
    18. Global
    19. History
    20. Image
    21. Input
    22. Layer
    23. Link
    24. Location
    25. Math
    26. Navigator
    27. Node
    28. Number
    29. Object
    30. Option
    31. RegExp
    32. Screen
    33. Select
    34. String
    35. Style
    36. Text
    37. Textarea
    38. Window
  5. About the Author
  6. Copyright