Synopses & Reviews
JavaScript is a powerful scripting language that can be embedded directly in HTML. It allows you to create dynamic, interactive Web-based applications that run completely within a Web browser; you don't have to do any server-side programming, like writing CGI scripts.JavaScript is a simpler language than Java. It can be embedded directly in Web pages without compilation, so it is more flexible and easier to use for simple tasks like animation. However, although you can write reasonably robust and complete Web applications using JavaScript alone, JavaScript is not a substitute for Java. In fact, JavaScript is a good client-side complement to Java; using the two together allows you to create more complex applications than are possible with JavaScript alone.JavaScript: The Definitive Guide provides a thorough description of the core JavaScript language and its client-side framework, complete with sophisticated examples that show you how to handle common tasks, like validating form data and working with cookies. The book also contains a definitive, in-depth reference section that covers every core and client-side JavaScript function, object, method, property, constructor, and event handler. This book is an indispensable reference for all JavaScript programmers, regardless of experience level.This third edition of JavaScript: The Definitive Guide describes the latest version of the language, JavaScript 1.2, as supported by Netscape Navigator 4 and Internet Explorer 4. The book also covers JavaScript 1.1, which is the first industry-standard version known as ECMAScript. The new features of JavaScript 1.2, which are likely to be embodied in a later ECMAScript standard release, are clearly indicated, so that you can use them as appropriate in your scripts.
Synopsis
As well as covering the basics of this well established and diverse subject area at all levels, Wrox books in this category continue to push into specialist areas, getting straight to the heart of key features such as tag libraries in JSP, and security in Java.
JavaScript is the language of the web, used in programming all the major browsers. It is a powerful scripting language that allows web developers to produce more powerful, user-friendly, and interactive web pages. JavaScript is not only for client-side development. It's increasingly finding favor as a server side programming language - in Microsoft's ASP technology - and as a programming language for administration tasks with applications such as Windows Script Host.
Synopsis
JavaScript is a powerful scripting language that can be embedded directly in HTML; it allows you to create dynamic, interactive Web-based applications that run completely within a Web browser."JavaScript: The Definitive Guide provides a thorough description of the core JavaScript language and its client-side framework, complete with sophisticated examples that show you how to handle common tasks. The book also contains a definitive, in-depth reference section that covers every core and client-side JavaScript function, object, method, property, constructor, and event handler. This third edition of "JavaScript: The Definitive Guide describes the latest version of the language, JavaScript 1.2, as supported by Netscape Navigator 4 and Internet Explorer 4. The book also covers JavaScript 1.1, which is the first industry-standard version known as ECMAScript.
Synopsis
The third edition of this definitive reference covers the latest version of JavaScript -- JavaScript 1.2 -- as supported by Netscape Navigator 4.0. It can be used to help readers create dynamic, interactive, Web-based applications that are powered by JavaScript.
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
Table of Contents
Preface
Chapter 1. Introduction to JavaScript
1.1 JavaScript Myths
1.2 Versions of JavaScript
1.3 Client-Side JavaScript: Executable Content in Web Pages
1.4 Client-Side JavaScript Features
1.5 JavaScript Security
1.6 Example: Computing Loan Payments with JavaScript
1.7 Using the Rest of This Book
1.8 Exploring JavaScript
Part 1. Core JavaScript
Chapter 2. Lexical Structure
2.1 Case Sensitivity
2.2 Whitespace and Line Breaks
2.3 Optional Semicolons
2.4 Comments
2.5 Literals
2.6 Identifiers
2.7 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 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 and Identity Operators
5.5 Comparison 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 with
6.17 import and export
6.18 The Empty Statement
6.19 Defining Modules
6.20 Exception Handling
6.21 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
9.3 Arrays in JavaScript 1.0
Chapter 10. Pattern Matching with Regular Expressions
10.1 Defining Regular Expressions
10.2 String Methods for Pattern Matching
10.3 The RegExp Object
10.4 RegExp Methods for Pattern Matching
10.5 RegExp Instance Properties
10.6 RegExp Class Properties
Chapter 11. Further Topics in JavaScript
11.1 Data Type Conversion
11.2 By Value Versus by Reference
11.3 Garbage Collection
11.4 More About Prototypes
11.5 Working with the Scope Chain
11.6 Lexical Scoping and the Closure Object
11.7 The Function Constructor and Function Literals
Part 2. 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 Dialogs
13.3 The Status Line
13.4 Timeouts and Intervals
13.5 The Navigator Object
13.6 The Screen Object
13.7 Window Control Methods
13.8 The Location Object
13.9 The History Object
13.10 Multiple Windows and Frames
Chapter 14. The Document Object Model
14.1 The DOM: An Overview
14.2 Document Properties
14.3 Dynamically Generated Documents
14.4 Forms
14.5 Images
14.6 Links
14.7 Anchors
14.8 Applets and Embedded Data
14.9 The Future of the DOM
Chapter 15. Events and Event Handling
15.1 Event Types
15.2 Event Handlers as HTML Attributes
15.3 Event Handlers as JavaScript Properties
15.4 Special Event Types
15.5 Fourth-Generation Event Model
15.6 Example: An Event Monitor
Chapter 16. Forms and Form Elements
16.1 The Form Object
16.2 Form Elements
16.3 Naming Forms and Form Elements
16.4 Form Element Values
16.5 Form Verification Example
Chapter 17. Dynamic HTML
17.1 Style Sheets
17.2 Dynamic Positioning
17.3 Example: Portable Dynamic Elements
Chapter 18. Saving State with Cookies
18.1 An Overview of Cookies
18.2 Storing Cookies
18.3 Reading Cookies
18.4 Cookie Example
Chapter 19. Compatibility Techniques
19.1 Platform and Browser Compatibility
19.2 Language Version Compatibility
19.3 Compatibility with Non-JavaScript Browsers
Chapter 20. LiveConnect: JavaScript and Java
20.1 Overview of LiveConnect
20.2 LiveConnect Data Types
20.3 LiveConnect Data Conversion
20.4 JavaScript Conversion of JavaObjects
20.5 Scripting Java with JavaScript
20.6 Using JavaScript from Java
20.7 Summary
Chapter 21. JavaScript Security
21.1 JavaScript and Security
21.2 Restricted or Privileged Features
21.3 The Same Origin Policy
21.4 The Data-Tainting Security Model
21.5 Signed Scripts and Privileges
21.6 Signing Scripts
21.7 Requesting Privileges
21.8 Mixing Signed and Unsigned Scripts
Part 3. Reference
Index