Synopses & Reviews
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.
Synopsis
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: The Definitive Guideprovides a thorough description of the core JavaScript language andboth the legacy and standard DOMs implemented in web browsers. The book also contains detailed reference sections thatcover 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 handlerin those APIs.This fourth edition of the bestselling JavaScript book has been carefully updated to cover JavaScript 1.5.The book also provides completecoverage of the W3C DOM standard (Level 1 and Level 2), while retainingmaterial on the legacy Level 0 DOM for backward compatibility.
Synopsis
To stay on top of their work, web professionals need the most up-to-date, complete reference available on the core JavaScript language, which is growing more and more essential for effective web design and development. This new edition covers JavaScript 1.5, the latest version of the language.
About the Author
David Flanagan is a computer programmer who spends most of his time writing about JavaScript and Java. His books with O'Reilly include Java in a Nutshell, Java Examples in a Nutshell, Java Foundation Classes in a Nutshell, JavaScript: The Definitive Guide, and JavaScript Pocket Reference. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and son in the U.S. Pacific Northwest bewteen the cities of Seattle, Washington and Vancouver, British Columbia. David has a simple website at http://www.davidflanagan.com.
Table of Contents
Dedication; Preface; What's New in the Fourth Edition; Conventions Used in This Book; Errata; Finding the Examples Online; Comments and Questions; Acknowledgments; Chapter 1: Introduction to JavaScript; 1.1 JavaScript Myths; 1.2 Versions of JavaScript; 1.3 Client-Side JavaScript; 1.4 JavaScript in Other Contexts; 1.5 Client-Side JavaScript: Executable Content in Web Pages; 1.6 Client-Side JavaScript Features; 1.7 JavaScript Security; 1.8 Example: Computing Loan Payments with JavaScript; 1.9 Using the Rest of This Book; 1.10 Exploring JavaScript; Core JavaScript; Chapter 2: Lexical Structure; 2.1 Character Set; 2.2 Case Sensitivity; 2.3 Whitespace and Line Breaks; 2.4 Optional Semicolons; 2.5 Comments; 2.6 Literals; 2.7 Identifiers; 2.8 Reserved Words; Chapter 3: Data Types and Values; 3.1 Numbers; 3.2 Strings; 3.3 Boolean Values; 3.4 Functions; 3.5 Objects; 3.6 Arrays; 3.7 null; 3.8 undefined; 3.9 The Date Object; 3.10 Regular Expressions; 3.11 Error Objects; 3.12 Primitive Data Type Wrapper Objects; Chapter 4: Variables; 4.1 Variable Typing; 4.2 Variable Declaration; 4.3 Variable Scope; 4.4 Primitive Types and Reference Types; 4.5 Garbage Collection; 4.6 Variables as Properties; 4.7 Variable Scope Revisited; Chapter 5: Expressions and Operators; 5.1 Expressions; 5.2 Operator Overview; 5.3 Arithmetic Operators; 5.4 Equality Operators; 5.5 Relational Operators; 5.6 String Operators; 5.7 Logical Operators; 5.8 Bitwise Operators; 5.9 Assignment Operators; 5.10 Miscellaneous Operators; Chapter 6: Statements; 6.1 Expression Statements; 6.2 Compound Statements; 6.3 if; 6.4 else if; 6.5 switch; 6.6 while; 6.7 do/while; 6.8 for; 6.9 for/in; 6.10 Labels; 6.11 break; 6.12 continue; 6.13 var; 6.14 function; 6.15 return; 6.16 throw; 6.17 try/catch/finally; 6.18 with; 6.19 The Empty Statement; 6.20 Summary of JavaScript Statements; Chapter 7: Functions; 7.1 Defining and Invoking Functions; 7.2 Functions as Data; 7.3 Function Scope: The Call Object; 7.4 Function Arguments: The Arguments Object; 7.5 Function Properties and Methods; Chapter 8: Objects; 8.1 Objects and Properties; 8.2 Constructors; 8.3 Methods; 8.4 Prototypes and Inheritance; 8.5 Object-Oriented JavaScript; 8.6 Objects as Associative Arrays; 8.7 Object Properties and Methods; Chapter 9: Arrays; 9.1 Arrays and Array Elements; 9.2 Array Methods; Chapter 10: Pattern Matching with Regular Expressions; 10.1 Defining Regular Expressions; 10.2 String Methods for Pattern Matching; 10.3 The RegExp Object; Chapter 11: Further Topics in JavaScript; 11.1 Data Type Conversion; 11.2 By Value Versus by Reference; 11.3 Garbage Collection; 11.4 Lexical Scoping and Nested Functions; 11.5 The Function( ) Constructor and Function Literals; 11.6 Netscape's JavaScript 1.2 Incompatibilities; Client-Side JavaScript; Chapter 12: JavaScript in Web Browsers; 12.1 The Web Browser Environment; 12.2 Embedding JavaScript in HTML; 12.3 Execution of JavaScript Programs; Chapter 13: Windows and Frames; 13.1 Window Overview; 13.2 Simple Dialog Boxes; 13.3 The Status Line; 13.4 Timeouts and Intervals; 13.5 Error Handling; 13.6 The Navigator Object; 13.7 The Screen Object; 13.8 Window Control Methods; 13.9 The Location Object; 13.10 The History Object; 13.11 Multiple Windows and Frames; Chapter 14: The Document Object; 14.1 Document Overview; 14.2 Dynamically Generated Documents; 14.3 Document Color Properties; 14.4 Document Information Properties; 14.5 Forms; 14.6 Images; 14.7 Links; 14.8 Anchors; 14.9 Applets; 14.10 Embedded Data; Chapter 15: Forms and Form Elements; 15.1 The Form Object; 15.2 Defining Form Elements; 15.3 Scripting Form Elements; 15.4 Form Verification Example; Chapter 16: Scripting Cookies; 16.1 An Overview of Cookies; 16.2 Storing Cookies; 16.3 Reading Cookies; 16.4 Cookie Example; Chapter 17: The Document Object Model; 17.1 An Overview of the DOM; 17.2 Using the Core DOM API; 17.3 DOM Compatibility with Internet Explorer 4; 17.4 DOM Compatibility with Netscape 4; 17.5 Convenience Methods: The Traversal and Range APIs; Chapter 18: Cascading Style Sheets and Dynamic HTML; 18.1 Styles and Style Sheets with CSS; 18.2 Element Positioning with CSS; 18.3 Scripting Styles; 18.4 DHTML in Fourth-Generation Browsers; 18.5 Other DOM APIs for Styles and Style Sheets; Chapter 19: Events and Event Handling; 19.1 Basic Event Handling; 19.2 Advanced Event Handling with DOM Level 2; 19.3 The Internet Explorer Event Model; 19.4 The Netscape 4 Event Model; Chapter 20: Compatibility Techniques; 20.1 Platform and Browser Compatibility; 20.2 Language Version Compatibility; 20.3 Compatibility with Non-JavaScript Browsers; Chapter 21: JavaScript Security; 21.1 JavaScript and Security; 21.2 Restricted Features; 21.3 The Same-Origin Policy; 21.4 Security Zones and Signed Scripts; Chapter 22: Using Java with JavaScript; 22.1 Scripting Java Applets; 22.2 Using JavaScript from Java; 22.3 Using Java Classes Directly; 22.4 LiveConnect Data Types; 22.5 LiveConnect Data Conversion; 22.6 JavaScript Conversion of JavaObjects; 22.7 Java-to-JavaScript Data Conversion; Core JavaScript Reference; Chapter 23: Core JavaScript Reference; Client-Side JavaScript Reference; Chapter 24: Client-Side JavaScript Reference; W3C DOM Reference; Chapter 25: W3C DOM Reference; Class, Property, Method, and Event Handler Index; Chapter 26: Class, Property, Method, and Event Handler Index; 26.1 A; 26.2 B; 26.3 C; 26.4 D; 26.5 E; 26.6 F; 26.7 G; 26.8 H; 26.9 I; 26.10 J; 26.11 K; 26.12 L; 26.13 M; 26.14 N; 26.15 O; 26.16 P; 26.17 Q; 26.18 R; 26.19 S; 26.20 T; 26.21 U; 26.22 V; 26.23 W; 26.24 X; 26.25 Y; 26.26 Z; Colophon;