JavaScript: The Definitive Guide, Fourth Edition

Book description

JavaScript is a powerful, object-based scripting language; JavaScript programs can be embedded directly in HTML web pages. When combined with the Document Object Model (DOM) defined by a web browser, JavaScript allows you to create Dynamic HTML content and interactive client-side web applications. JavaScript syntax is based on the popular programming languages C, C++, and Java, which makes it familiar and easy to learn for experienced programmers. At the same time, JavaScript is an interpreted scripting language, providing a flexible, forgiving programming environment in which new programmers can learn. JavaScript: The Definitive Guide provides a thorough description of the core JavaScript language and both the legacy and standard DOMs implemented in web browsers. The book includes sophisticated examples that show you how to handle common tasks, like validating form data, working with cookies, and creating portable DHTML animations. The book also contains detailed reference sections that cover the core JavaScript API, the legacy client-side API, and the W3C standard DOM API, documenting every JavaScript object, method, property, constructor, constant, function, and event handler in those APIs. This fourth edition of the bestselling JavaScript book has been carefully updated to cover JavaScript 1.5 (ECMAScript version 3). The book also provides complete coverage of the W3C DOM standard (Level 1 and Level 2), while retaining material on the legacy Level 0 DOM for backward compatibility. JavaScript: The Definitive Guide is a complete programmer's guide and reference manual for JavaScript. It is particularly useful for developers working with the latest standards-compliant web browsers, like Internet Explorer 6, Netscape 6, and Mozilla. HTML authors can learn how to use JavaScript to build dynamic web pages. Experienced programmers can quickly find the information they need to start writing sophisticated JavaScript programs. This book is an indispensable reference for all JavaScript programmers, regardless of experience level.

Table of contents

  1. JavaScript: The Definitive Guide, 4th Edition
    1. Preface
      1. What’s New in the Fourth Edition
      2. Conventions Used in This Book
      3. Errata
      4. Finding the Examples Online
      5. Comments and Questions
      6. Acknowledgments
    2. 1. Introduction to JavaScript
      1. JavaScript Myths
        1. JavaScript Is Not Java
        2. JavaScript Is Not Simple
      2. Versions of JavaScript
      3. Client-Side JavaScript
      4. JavaScript in Other Contexts
      5. Client-Side JavaScript: Executable Content in Web Pages
      6. Client-Side JavaScript Features
        1. Control Document Appearance and Content
        2. Control the Browser
        3. Interact with HTML Forms
        4. Interact with the User
        5. Read and Write Client State with Cookies
        6. Still More Features
        7. What JavaScript Can’t Do
      7. JavaScript Security
      8. Example: Computing Loan Payments with JavaScript
      9. Using the Rest of This Book
      10. Exploring JavaScript
    3. I. Core JavaScript
      1. 2. Lexical Structure
        1. Character Set
        2. Case Sensitivity
        3. Whitespace and Line Breaks
        4. Optional Semicolons
        5. Comments
        6. Literals
        7. Identifiers
        8. Reserved Words
      2. 3. Data Types and Values
        1. Numbers
          1. Integer Literals
          2. Hexadecimal and Octal Literals
          3. Floating-Point Literals
          4. Working with Numbers
          5. Special Numeric Values
        2. Strings
          1. String Literals
          2. Escape Sequences in String Literals
          3. Working with Strings
        3. Boolean Values
        4. Functions
          1. Function Literals
        5. Objects
          1. Creating Objects
          2. Object Literals
        6. Arrays
          1. Creating Arrays
          2. Array Literals
        7. null
        8. undefined
        9. The Date Object
        10. Regular Expressions
        11. Error Objects
        12. Primitive Data Type Wrapper Objects
      3. 4. Variables
        1. Variable Typing
        2. Variable Declaration
          1. Repeated and Omitted Declarations
        3. Variable Scope
          1. No Block Scope
          2. Undefined Versus Unassigned
        4. Primitive Types and Reference Types
        5. Garbage Collection
        6. Variables as Properties
          1. The Global Object
          2. Local Variables: The Call Object
          3. JavaScript Execution Contexts
        7. Variable Scope Revisited
      4. 5. Expressions and Operators
        1. Expressions
        2. Operator Overview
          1. Number of Operands
          2. Type of Operands
          3. Operator Precedence
          4. Operator Associativity
        3. Arithmetic Operators
        4. Equality Operators
          1. Equality (==) and Identity (===)
            1. Equality and inequality in Netscape
          2. Inequality (!=) and Non-Identity (!==)
        5. Relational Operators
          1. Comparison Operators
          2. The in Operator
          3. The instanceof Operator
        6. String Operators
        7. Logical Operators
          1. Logical AND (&&)
          2. Logical OR (||)
          3. Logical NOT (!)
        8. Bitwise Operators
        9. Assignment Operators
          1. Assignment with Operation
        10. Miscellaneous Operators
          1. The Conditional Operator (?:)
          2. The typeof Operator
          3. The Object Creation Operator (new)
          4. The delete Operator
          5. The void Operator
          6. The Comma Operator (,)
          7. Array and Object Access Operators
          8. The Function Call Operator
      5. 6. Statements
        1. Expression Statements
        2. Compound Statements
        3. if
        4. else if
        5. switch
        6. while
        7. do/while
        8. for
        9. for/in
        10. Labels
        11. break
        12. continue
        13. var
        14. function
        15. return
        16. throw
        17. try/catch/finally
        18. with
        19. The Empty Statement
        20. Summary of JavaScript Statements
      6. 7. Functions
        1. Defining and Invoking Functions
          1. Nested Functions
          2. The Function( ) Constructor
          3. Function Literals
        2. Functions as Data
        3. Function Scope: The Call Object
        4. Function Arguments: The Arguments Object
          1. The callee Property
        5. Function Properties and Methods
          1. The length Property
          2. The prototype Property
          3. Defining Your Own Function Properties
          4. The apply( ) and call( ) Methods
      7. 8. Objects
        1. Objects and Properties
          1. Creating Objects
          2. Setting and Querying Properties
          3. Enumerating Properties
          4. Undefined Properties
        2. Constructors
        3. Methods
        4. Prototypes and Inheritance
          1. Prototypes and Built-in Classes
        5. Object-Oriented JavaScript
          1. Instance Properties
          2. Instance Methods
          3. Class Properties
          4. Class Methods
          5. Example: The Circle Class
          6. Example: Complex Numbers
          7. Superclasses and Subclasses
        6. Objects as Associative Arrays
        7. Object Properties and Methods
          1. The constructor Property
          2. The toString( ) Method
          3. The toLocaleString( ) Method
          4. The valueOf( ) Method
          5. The hasOwnProperty( ) Method
          6. The propertyIsEnumerable( ) Method
          7. The isPrototypeOf( ) Method
      8. 9. Arrays
        1. Arrays and Array Elements
          1. Creating Arrays
          2. Reading and Writing Array Elements
          3. Adding New Elements to an Array
          4. Array Length
          5. Multidimensional Arrays
        2. Array Methods
          1. join( )
          2. reverse( )
          3. sort( )
          4. concat( )
          5. slice( )
          6. splice( )
          7. push( ) and pop( )
          8. unshift( ) and shift( )
          9. toString( ) and toLocaleString( )
      9. 10. Pattern Matching with Regular Expressions
        1. Defining Regular Expressions
          1. Literal Characters
          2. Character Classes
          3. Repetition
            1. Non-greedy repetition
          4. Alternation, Grouping, and References
          5. Specifying Match Position
          6. Flags
          7. Perl RegExp Features Not Supported in JavaScript
        2. String Methods for Pattern Matching
        3. The RegExp Object
          1. RegExp Methods for Pattern Matching
          2. RegExp Instance Properties
      10. 11. Further Topics in JavaScript
        1. Data Type Conversion
          1. Object-to-Primitive Conversion
          2. Explicit Type Conversions
          3. Converting Numbers to Strings
          4. Converting Strings to Numbers
        2. By Value Versus by Reference
          1. Primitive Types and Reference Types
          2. Copying and Passing Strings
          3. Comparing Strings
          4. By Value Versus by Reference: Summary
        3. Garbage Collection
          1. Mark-and-Sweep Garbage Collection
          2. Garbage Collection by Reference Counting
        4. Lexical Scoping and Nested Functions
        5. The Function( ) Constructor and Function Literals
        6. Netscape’s JavaScript 1.2 Incompatibilities
    4. II. Client-Side JavaScript
      1. 12. JavaScript in Web Browsers
        1. The Web Browser Environment
          1. The Window as Global Execution Context
          2. The Client-Side Object Hierarchy and the Document Object Model
          3. The Event-Driven Programming Model
        2. Embedding JavaScript in HTML
          1. The <script> Tag
            1. The language and type attributes
            2. The </script> tag
            3. The defer attribute
          2. Including JavaScript Files
          3. Event Handlers
          4. JavaScript in URLs
          5. JavaScript in Nonstandard Contexts
        3. Execution of JavaScript Programs
          1. Scripts
          2. Functions
          3. Event Handlers
            1. onload and onunload event handlers
          4. JavaScript URLs
          5. Window and Variable Lifetime
      2. 13. Windows and Frames
        1. Window Overview
        2. Simple Dialog Boxes
        3. The Status Line
        4. Timeouts and Intervals
        5. Error Handling
        6. The Navigator Object
        7. The Screen Object
        8. Window Control Methods
          1. Opening Windows
          2. Closing Windows
          3. Window Geometry
          4. Keyboard Focus and Visibility
          5. Scrolling
          6. Window Methods Example
        9. The Location Object
        10. The History Object
        11. Multiple Windows and Frames
          1. Relationships Between Frames
          2. Window and Frame Names
          3. JavaScript in Interacting Windows
          4. Example: Colored Frames
      3. 14. The Document Object
        1. Document Overview
          1. Document Methods
          2. Document Properties
          3. The Document Object and Standards
          4. Naming Document Objects
          5. Document Objects and Event Handlers
        2. Dynamically Generated Documents
          1. Non-HTML Documents
        3. Document Color Properties
        4. Document Information Properties
        5. Forms
        6. Images
          1. Image Replacement with the src Property
          2. Offscreen Images and Caching
          3. Image Event Handlers
          4. Other Image Properties
          5. Image-Replacement Example
        7. Links
          1. Links, Web Crawlers, and JavaScript Security
          2. Link Event Handlers
        8. Anchors
        9. Applets
        10. Embedded Data
      4. 15. Forms and Form Elements
        1. The Form Object
        2. Defining Form Elements
        3. Scripting Form Elements
          1. Naming Forms and Form Elements
          2. Form Element Properties
          3. Form Element Event Handlers
          4. Buttons
          5. Toggle Buttons
          6. Text Fields
          7. Select and Option Elements
          8. Hidden Elements
          9. Fieldset Elements
        4. Form Verification Example
      5. 16. Scripting Cookies
        1. An Overview of Cookies
        2. Storing Cookies
          1. Cookie Limitations
        3. Reading Cookies
        4. Cookie Example
      6. 17. The Document Object Model
        1. An Overview of the DOM
          1. Representing Documents as Trees
          2. Nodes
            1. Types of nodes
            2. Attributes
          3. The DOM HTML API
            1. HTML naming conventions
          4. DOM Levels and Features
          5. DOM Conformance
            1. DOM conformance in Internet Explorer
          6. Language-Independent DOM Interfaces
        2. Using the Core DOM API
          1. Traversing a Document
          2. Finding Specific Elements in a Document
          3. Modifying a Document
          4. Adding Content to a Document
          5. Working with Document Fragments
          6. Example: A Dynamically Created Table of Contents
          7. Working with XML Documents
        3. DOM Compatibility with Internet Explorer 4
          1. Traversing a Document
          2. Finding Document Elements
          3. Modifying Documents
        4. DOM Compatibility with Netscape 4
        5. Convenience Methods: The Traversal and Range APIs
          1. The DOM Traversal API
            1. NodeIterator and TreeWalker
            2. Filtering
          2. The DOM Range API
            1. Start and end positions
            2. Manipulating ranges
      7. 18. Cascading Style Sheets and Dynamic HTML
        1. Styles and Style Sheets with CSS
          1. Applying Style Rules to Document Elements
          2. Associating Style Sheets with Documents
          3. The Cascade
          4. Versions of CSS
          5. CSS Example
        2. Element Positioning with CSS
          1. The Key to DHTML: The position Attribute
          2. Specifying the Position and Size of Elements
            1. Element size and position details
          3. The Third Dimension: z-index
          4. Element Display and Visibility
          5. Partial Visibility: overflow and clip
          6. CSS Positioning Example
        3. Scripting Styles
          1. Naming Conventions: CSS Attributes in JavaScript
          2. Working with Style Properties
          3. Example: Dynamic Bar Charts
          4. DHTML Animations
        4. DHTML in Fourth-Generation Browsers
          1. DHTML in Internet Explorer 4
          2. DHTML in Netscape 4
          3. Example: A Cross-Platform DHTML Animation
        5. Other DOM APIs for Styles and Style Sheets
          1. Style Declarations
          2. Computed Styles
          3. Override Styles
          4. Creating Style Sheets
          5. Traversing Style Sheets
      8. 19. Events and Event Handling
        1. Basic Event Handling
          1. Events and Event Types
          2. Event Handlers as Attributes
          3. Event Handlers as Properties
            1. Explicitly invoking event handlers
          4. Event Handler Return Values
          5. Event Handlers and the this Keyword
          6. Scope of Event Handlers
        2. Advanced Event Handling with DOM Level 2
          1. Event Propagation
          2. Event Handler Registration
          3. addEventListener( ) and the this Keyword
          4. Registering Objects as Event Handlers
          5. Event Modules and Event Types
          6. Event Interfaces and Event Details
            1. Event
            2. UIEvent
            3. MouseEvent
            4. MutationEvent
          7. Example: Dragging Document Elements
          8. Mixing Event Models
          9. Synthesizing Events
        3. The Internet Explorer Event Model
          1. The IE Event Object
          2. The IE Event Object as a Global Variable
          3. Event Bubbling in IE
          4. IE Event-Handler Registration
          5. Example: Dragging with the IE Event Model
        4. The Netscape 4 Event Model
          1. The Netscape 4 Event Object
          2. Event Capturing in Netscape 4
          3. Example: Dragging with the Netscape 4 Event Model
      9. 20. Compatibility Techniques
        1. Platform and Browser Compatibility
          1. The Least-Common-Denominator Approach
          2. Defensive Coding
          3. Feature Testing
          4. Platform-Specific Workarounds
          5. Compatibility Through Server-Side Scripts
          6. Ignore the Problem
          7. Fail Gracefully
        2. Language Version Compatibility
          1. The language Attribute
          2. Explicit Version Testing
          3. Suppressing Version-Related Errors
          4. Loading a New Page for Compatibility
        3. Compatibility with Non-JavaScript Browsers
          1. Hiding Scripts from Old Browsers
          2. <noscript>
      10. 21. JavaScript Security
        1. JavaScript and Security
        2. Restricted Features
        3. The Same-Origin Policy
        4. Security Zones and Signed Scripts
      11. 22. Using Java with JavaScript
        1. Scripting Java Applets
        2. Using JavaScript from Java
          1. The JSObject Class
          2. Using JSObjects in Applets
            1. Compiling applets that use the JSObject class
            2. The mayscript attribute
        3. Using Java Classes Directly
        4. LiveConnect Data Types
          1. The JavaPackage Class
          2. The JavaClass Class
          3. The JavaObject Class
          4. The JavaArray Class
          5. Java Methods
        5. LiveConnect Data Conversion
          1. Wrapper Objects
          2. LiveConnect Data Conversion in Netscape 3
        6. JavaScript Conversion of JavaObjects
        7. Java-to-JavaScript Data Conversion
    5. III. Core JavaScript Reference
      1. 23. Core JavaScript Reference
        1. Sample Entry
        2. arguments[ ]
        3. Arguments
        4. Arguments.callee
        5. Arguments.length
        6. Array
        7. Array.concat( )
        8. Array.join( )
        9. Array.length
        10. Array.pop( )
        11. Array.push( )
        12. Array.reverse( )
        13. Array.shift( )
        14. Array.slice( )
        15. Array.sort( )
        16. Array.splice( )
        17. Array.toLocaleString( )
        18. Array.toString( )
        19. Array.unshift( )
        20. Boolean
        21. Boolean.toString( )
        22. Boolean.valueOf( )
        23. Date
        24. Date.getDate( )
        25. Date.getDay( )
        26. Date.getFullYear( )
        27. Date.getHours( )
        28. Date.getMilliseconds( )
        29. Date.getMinutes( )
        30. Date.getMonth( )
        31. Date.getSeconds( )
        32. Date.getTime( )
        33. Date.getTimezoneOffset( )
        34. Date.getUTCDate( )
        35. Date.getUTCDay( )
        36. Date.getUTCFullYear( )
        37. Date.getUTCHours( )
        38. Date.getUTCMilliseconds( )
        39. Date.getUTCMinutes( )
        40. Date.getUTCMonth( )
        41. Date.getUTCSeconds( )
        42. Date.getYear( )
        43. Date.parse( )
        44. Date.setDate( )
        45. Date.setFullYear( )
        46. Date.setHours( )
        47. Date.setMilliseconds( )
        48. Date.setMinutes( )
        49. Date.setMonth( )
        50. Date.setSeconds( )
        51. Date.setTime( )
        52. Date.setUTCDate( )
        53. Date.setUTCFullYear( )
        54. Date.setUTCHours( )
        55. Date.setUTCMilliseconds( )
        56. Date.setUTCMinutes( )
        57. Date.setUTCMonth( )
        58. Date.setUTCSeconds( )
        59. Date.setYear( )
        60. Date.toDateString( )
        61. Date.toGMTString( )
        62. Date.toLocaleDateString( )
        63. Date.toLocaleString( )
        64. Date.toLocaleTimeString( )
        65. Date.toString( )
        66. Date.toTimeString( )
        67. Date.toUTCString( )
        68. Date.UTC( )
        69. Date.valueOf( )
        70. decodeURI( )
        71. decodeURIComponent( )
        72. encodeURI( )
        73. encodeURIComponent( )
        74. Error
        75. Error.message
        76. Error.name
        77. Error.toString( )
        78. escape( )
        79. eval( )
        80. EvalError
        81. Function
        82. Function.apply( )
        83. Function.arguments[]
        84. Function.call( )
        85. Function.caller
        86. Function.length
        87. Function.prototype
        88. Function.toString( )
        89. Global
        90. Infinity
        91. isFinite( )
        92. isNaN( )
        93. Math
        94. Math.abs( )
        95. Math.acos( )
        96. Math.asin( )
        97. Math.atan( )
        98. Math.atan2( )
        99. Math.ceil( )
        100. Math.cos( )
        101. Math.E
        102. Math.exp( )
        103. Math.floor( )
        104. Math.LN10
        105. Math.LN2
        106. Math.log( )
        107. Math.LOG10E
        108. Math.LOG2E
        109. Math.max( )
        110. Math.min( )
        111. Math.PI
        112. Math.pow( )
        113. Math.random( )
        114. Math.round( )
        115. Math.sin( )
        116. Math.sqrt( )
        117. Math.SQRT1_2
        118. Math.SQRT2
        119. Math.tan( )
        120. NaN
        121. Number
        122. Number.MAX_VALUE
        123. Number.MIN_VALUE
        124. Number.NaN
        125. Number.NEGATIVE_INFINITY
        126. Number.POSITIVE_INFINITY
        127. Number.toExponential( )
        128. Number.toFixed( )
        129. Number.toLocaleString( )
        130. Number.toPrecision( )
        131. Number.toString( )
        132. Number.valueOf( )
        133. Object
        134. Object.constructor
        135. Object.hasOwnProperty( )
        136. Object.isPrototypeOf( )
        137. Object.propertyIsEnumerable( )
        138. Object.toLocaleString( )
        139. Object.toString( )
        140. Object.valueOf( )
        141. parseFloat( )
        142. parseInt( )
        143. RangeError
        144. ReferenceError
        145. RegExp
        146. RegExp.exec( )
        147. RegExp.global
        148. RegExp.ignoreCase
        149. RegExp.lastIndex
        150. RegExp.source
        151. RegExp.test( )
        152. RegExp.toString( )
        153. String
        154. String.charAt( )
        155. String.charCodeAt( )
        156. String.concat( )
        157. String.fromCharCode( )
        158. String.indexOf( )
        159. String.lastIndexOf( )
        160. String.length
        161. String.localeCompare( )
        162. String.match( )
        163. String.replace( )
        164. String.search( )
        165. String.slice( )
        166. String.split( )
        167. String.substr( )
        168. String.substring( )
        169. String.toLocaleLowerCase( )
        170. String.toLocaleUpperCase( )
        171. String.toLowerCase( )
        172. String.toString( )
        173. String.toUpperCase( )
        174. String.valueOf( )
        175. SyntaxError
        176. TypeError
        177. undefined
        178. unescape( )
        179. URIError
    6. IV. Client-Side JavaScript Reference
      1. 24. Client-Side JavaScript Reference
        1. Sample Entry
        2. Anchor
        3. Applet
        4. Area
        5. Button
        6. Button.onclick
        7. Checkbox
        8. Checkbox.onclick
        9. Document
        10. Document.all[]
        11. Document.captureEvents( )
        12. Document.clear( )
        13. Document.close( )
        14. Document.cookie
        15. Document.domain
        16. Document.elementFromPoint( )
        17. Document.getSelection( )
        18. Document.handleEvent( )
        19. Document.lastModified
        20. Document.links[]
        21. Document.open( )
        22. Document.releaseEvents( )
        23. Document.routeEvent( )
        24. Document.URL
        25. Document.write( )
        26. Document.writeln( )
        27. Element
        28. Event
        29. FileUpload
        30. FileUpload.onchange
        31. Form
        32. Form.elements[]
        33. Form.onreset
        34. Form.onsubmit
        35. Form.reset( )
        36. Form.submit( )
        37. Form.target
        38. Frame
        39. getClass( )
        40. Hidden
        41. History
        42. History.back( )
        43. History.forward( )
        44. History.go( )
        45. HTMLElement
        46. HTMLElement.contains( )
        47. HTMLElement.getAttribute( )
        48. HTMLElement.handleEvent( )
        49. HTMLElement.insertAdjacentHTML( )
        50. HTMLElement.insertAdjacentText( )
        51. HTMLElement.onclick
        52. HTMLElement.ondblclick
        53. HTMLElement.onhelp
        54. HTMLElement.onkeydown
        55. HTMLElement.onkeypress
        56. HTMLElement.onkeyup
        57. HTMLElement.onmousedown
        58. HTMLElement.onmousemove
        59. HTMLElement.onmouseout
        60. HTMLElement.onmouseover
        61. HTMLElement.onmouseup
        62. HTMLElement.removeAttribute( )
        63. HTMLElement.scrollIntoView( )
        64. HTMLElement.setAttribute( )
        65. Image
        66. Image.onabort
        67. Image.onerror
        68. Image.onload
        69. Input
        70. Input.blur( )
        71. Input.click( )
        72. Input.focus( )
        73. Input.name
        74. Input.onblur
        75. Input.onchange
        76. Input.onclick
        77. Input.onfocus
        78. Input.select( )
        79. Input.type
        80. Input.value
        81. JavaArray
        82. JavaClass
        83. JavaObject
        84. JavaPackage
        85. JSObject
        86. JSObject.call( )
        87. JSObject.eval( )
        88. JSObject.getMember( )
        89. JSObject.getSlot( )
        90. JSObject.getWindow( )
        91. JSObject.removeMember( )
        92. JSObject.setMember( )
        93. JSObject.setSlot( )
        94. JSObject.toString( )
        95. Layer
        96. Layer.captureEvents( )
        97. Layer.handleEvent( )
        98. Layer.load( )
        99. Layer.moveAbove( )
        100. Layer.moveBelow( )
        101. Layer.moveBy( )
        102. Layer.moveTo( )
        103. Layer.moveToAbsolute( )
        104. Layer.offset( )
        105. Layer.releaseEvents( )
        106. Layer.resizeBy( )
        107. Layer.resizeTo( )
        108. Layer.routeEvent( )
        109. Link
        110. Link.onclick
        111. Link.onmouseout
        112. Link.onmouseover
        113. Link.target
        114. Location
        115. Location.reload( )
        116. Location.replace( )
        117. MimeType
        118. Navigator
        119. Navigator.javaEnabled( )
        120. Navigator.plugins.refresh( )
        121. Option
        122. Password
        123. Plugin
        124. Radio
        125. Radio.onclick
        126. Reset
        127. Reset.onclick
        128. Screen
        129. Select
        130. Select.onchange
        131. Select.options[]
        132. Style
        133. Submit
        134. Submit.onclick
        135. Text
        136. Text.onchange
        137. Textarea
        138. Textarea.onchange
        139. URL
        140. Window
        141. Window.alert( )
        142. Window.back( )
        143. Window.blur( )
        144. Window.captureEvents( )
        145. Window.clearInterval( )
        146. Window.clearTimeout( )
        147. Window.close( )
        148. Window.confirm( )
        149. Window.defaultStatus
        150. Window.focus( )
        151. Window.forward( )
        152. Window.handleEvent( )
        153. Window.home( )
        154. Window.moveBy( )
        155. Window.moveTo( )
        156. Window.name
        157. Window.navigate( )
        158. Window.onblur
        159. Window.onerror
        160. Window.onfocus
        161. Window.onload
        162. Window.onmove
        163. Window.onresize
        164. Window.onunload
        165. Window.open( )
        166. Window.print( )
        167. Window.prompt( )
        168. Window.releaseEvents( )
        169. Window.resizeBy( )
        170. Window.resizeTo( )
        171. Window.routeEvent( )
        172. Window.scroll( )
        173. Window.scrollBy( )
        174. Window.scrollTo( )
        175. Window.setInterval( )
        176. Window.setTimeout( )
        177. Window.status
        178. Window.stop( )
    7. V. W3C DOM Reference
      1. 25. W3C DOM Reference
        1. Sample Entry
        2. AbstractView
        3. AbstractView.getComputedStyle( )
        4. Attr
        5. CDATASection
        6. CharacterData
        7. CharacterData.appendData( )
        8. CharacterData.deleteData( )
        9. CharacterData.insertData( )
        10. CharacterData.replaceData( )
        11. CharacterData.substringData( )
        12. Comment
        13. Counter
        14. CSS2Properties
        15. CSSCharsetRule
        16. CSSFontFaceRule
        17. CSSImportRule
        18. CSSMediaRule
        19. CSSMediaRule.deleteRule( )
        20. CSSMediaRule.insertRule( )
        21. CSSPageRule
        22. CSSPrimitiveValue
        23. CSSPrimitiveValue.getCounterValue( )
        24. CSSPrimitiveValue.getFloatValue( )
        25. CSSPrimitiveValue.getRectValue( )
        26. CSSPrimitiveValue.getRGBColorValue( )
        27. CSSPrimitiveValue.getStringValue( )
        28. CSSPrimitiveValue.setFloatValue( )
        29. CSSPrimitiveValue.setStringValue( )
        30. CSSRule
        31. CSSRuleList
        32. CSSRuleList.item( )
        33. CSSStyleDeclaration
        34. CSSStyleDeclaration.getPropertyCSSValue( )
        35. CSSStyleDeclaration.getPropertyPriority( )
        36. CSSStyleDeclaration.getPropertyValue( )
        37. CSSStyleDeclaration.item( )
        38. CSSStyleDeclaration.removeProperty( )
        39. CSSStyleDeclaration.setProperty( )
        40. CSSStyleRule
        41. CSSStyleSheet
        42. CSSStyleSheet.deleteRule( )
        43. CSSStyleSheet.insertRule( )
        44. CSSUnknownRule
        45. CSSValue
        46. CSSValueList
        47. CSSValueList.item( )
        48. Document
        49. Document.createAttribute( )
        50. Document.createAttributeNS( )
        51. Document.createCDATASection( )
        52. Document.createComment( )
        53. Document.createDocumentFragment( )
        54. Document.createElement( )
        55. Document.createElementNS( )
        56. Document.createEntityReference( )
        57. Document.createEvent( )
        58. Document.createNodeIterator( )
        59. Document.createProcessingInstruction( )
        60. Document.createRange( )
        61. Document.createTextNode( )
        62. Document.createTreeWalker( )
        63. Document.getElementById( )
        64. Document.getElementsByTagName( )
        65. Document.getElementsByTagNameNS( )
        66. Document.getOverrideStyle( )
        67. Document.importNode( )
        68. DocumentCSS
        69. DocumentEvent
        70. DocumentFragment
        71. DocumentRange
        72. DocumentStyle
        73. DocumentTraversal
        74. DocumentType
        75. DocumentView
        76. DOMException
        77. DOMImplementation
        78. DOMImplementation.createCSSStyleSheet( )
        79. DOMImplementation.createDocument( )
        80. DOMImplementation.createDocumentType( )
        81. DOMImplementation.createHTMLDocument( )
        82. DOMImplementation.hasFeature( )
        83. DOMImplementationCSS
        84. Element
        85. Element.getAttribute( )
        86. Element.getAttributeNode( )
        87. Element.getAttributeNodeNS( )
        88. Element.getAttributeNS( )
        89. Element.getElementsByTagName( )
        90. Element.getElementsByTagNameNS( )
        91. Element.hasAttribute( )
        92. Element.hasAttributeNS( )
        93. Element.removeAttribute( )
        94. Element.removeAttributeNode( )
        95. Element.removeAttributeNS( )
        96. Element.setAttribute( )
        97. Element.setAttributeNode( )
        98. Element.setAttributeNodeNS( )
        99. Element.setAttributeNS( )
        100. ElementCSSInlineStyle
        101. Entity
        102. EntityReference
        103. Event
        104. Event.initEvent( )
        105. Event.preventDefault( )
        106. Event.stopPropagation( )
        107. EventException
        108. EventListener
        109. EventTarget
        110. EventTarget.addEventListener( )
        111. EventTarget.dispatchEvent( )
        112. EventTarget.removeEventListener( )
        113. HTMLAnchorElement
        114. HTMLAnchorElement.blur( )
        115. HTMLAnchorElement.focus( )
        116. HTMLBodyElement
        117. HTMLCollection
        118. HTMLCollection.item( )
        119. HTMLCollection.namedItem( )
        120. HTMLDocument
        121. HTMLDocument.close( )
        122. HTMLDocument.getElementById( )
        123. HTMLDocument.getElementsByName( )
        124. HTMLDocument.open( )
        125. HTMLDocument.write( )
        126. HTMLDocument.writeln( )
        127. HTMLDOMImplementation
        128. HTMLElement
        129. HTMLFormElement
        130. HTMLFormElement.reset( )
        131. HTMLFormElement.submit( )
        132. HTMLInputElement
        133. HTMLInputElement.blur( )
        134. HTMLInputElement.click( )
        135. HTMLInputElement.focus( )
        136. HTMLInputElement.select( )
        137. HTMLOptionElement
        138. HTMLSelectElement
        139. HTMLSelectElement.add( )
        140. HTMLSelectElement.blur( )
        141. HTMLSelectElement.focus( )
        142. HTMLSelectElement.remove( )
        143. HTMLTableCaptionElement
        144. HTMLTableCellElement
        145. HTMLTableColElement
        146. HTMLTableElement
        147. HTMLTableElement.createCaption( )
        148. HTMLTableElement.createTFoot( )
        149. HTMLTableElement.createTHead( )
        150. HTMLTableElement.deleteCaption( )
        151. HTMLTableElement.deleteRow( )
        152. HTMLTableElement.deleteTFoot( )
        153. HTMLTableElement.deleteTHead( )
        154. HTMLTableElement.insertRow( )
        155. HTMLTableRowElement
        156. HTMLTableRowElement.deleteCell( )
        157. HTMLTableRowElement.insertCell( )
        158. HTMLTableSectionElement
        159. HTMLTableSectionElement.deleteRow( )
        160. HTMLTableSectionElement.insertRow( )
        161. HTMLTextAreaElement
        162. HTMLTextAreaElement.blur( )
        163. HTMLTextAreaElement.focus( )
        164. HTMLTextAreaElement.select( )
        165. LinkStyle
        166. MediaList
        167. MediaList.appendMedium( )
        168. MediaList.deleteMedium( )
        169. MediaList.item( )
        170. MouseEvent
        171. MouseEvent.initMouseEvent( )
        172. MutationEvent
        173. MutationEvent.initMutationEvent( )
        174. NamedNodeMap
        175. NamedNodeMap.getNamedItem( )
        176. NamedNodeMap.getNamedItemNS( )
        177. NamedNodeMap.item( )
        178. NamedNodeMap.removeNamedItem( )
        179. NamedNodeMap.removeNamedItemNS( )
        180. NamedNodeMap.setNamedItem( )
        181. NamedNodeMap.setNamedItemNS( )
        182. Node
        183. Node.appendChild( )
        184. Node.cloneNode( )
        185. Node.hasAttributes( )
        186. Node.hasChildNodes( )
        187. Node.insertBefore( )
        188. Node.isSupported( )
        189. Node.normalize( )
        190. Node.removeChild( )
        191. Node.replaceChild( )
        192. NodeFilter
        193. NodeIterator
        194. NodeIterator.detach( )
        195. NodeIterator.nextNode( )
        196. NodeIterator.previousNode( )
        197. NodeList
        198. NodeList.item( )
        199. Notation
        200. ProcessingInstruction
        201. Range
        202. Range.cloneContents( )
        203. Range.cloneRange( )
        204. Range.collapse( )
        205. Range.compareBoundaryPoints( )
        206. Range.deleteContents( )
        207. Range.detach( )
        208. Range.extractContents( )
        209. Range.insertNode( )
        210. Range.selectNode( )
        211. Range.selectNodeContents( )
        212. Range.setEnd( )
        213. Range.setEndAfter( )
        214. Range.setEndBefore( )
        215. Range.setStart( )
        216. Range.setStartAfter( )
        217. Range.setStartBefore( )
        218. Range.surroundContents( )
        219. Range.toString( )
        220. RangeException
        221. Rect
        222. RGBColor
        223. StyleSheet
        224. StyleSheetList
        225. StyleSheetList.item( )
        226. Text
        227. Text.splitText( )
        228. TreeWalker
        229. TreeWalker.firstChild( )
        230. TreeWalker.lastChild( )
        231. TreeWalker.nextNode( )
        232. TreeWalker.nextSibling( )
        233. TreeWalker.parentNode( )
        234. TreeWalker.previousNode( )
        235. TreeWalker.previousSibling( )
        236. UIEvent
        237. UIEvent.initUIEvent( )
        238. ViewCSS
    8. VI. Class, Property, Method, and Event Handler Index
      1. 26. Class, Property, Method, and Event Handler Index
        1. A
        2. B
        3. C
        4. D
        5. E
        6. F
        7. G
        8. H
        9. I
        10. J
        11. K
        12. L
        13. M
        14. N
        15. O
        16. P
        17. Q
        18. R
        19. S
        20. T
        21. U
        22. V
        23. W
        24. X
        25. Y
        26. Z
    9. Index
    10. Colophon

Product information

  • Title: JavaScript: The Definitive Guide, Fourth Edition
  • Author(s):
  • Release date: November 2001
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596000486