Acknowledgments | p. xxiii |
Introduction | |
Introduction to JavaScript | p. 3 |
A First Look at JavaScript | p. 4 |
Adding JavaScript to HTML Documents | p. 7 |
JavaScript Applications | p. 25 |
History of JavaScript | p. 26 |
Summary | p. 28 |
JavaScript Core Features--Overview | p. 29 |
Basic Definitions | p. 30 |
Script Execution Order | p. 30 |
Case Sensitivity | p. 31 |
Whitespace | p. 33 |
Statements | p. 34 |
Variables | p. 37 |
Basic Data Types | p. 37 |
Composite Types | p. 39 |
Flow Control | p. 45 |
Loops | p. 47 |
Functions | p. 49 |
Input and Output in JavaScript | p. 50 |
Regular Expressions | p. 53 |
Comments | p. 54 |
Summary | p. 55 |
Core Language | |
Data Types and Variables | p. 59 |
Basic Notions | p. 60 |
Weak Typing | p. 61 |
Primitive Types | p. 61 |
Composite Types | p. 74 |
Functions | p. 77 |
Variables | p. 80 |
Type Conversion | p. 86 |
Summary | p. 90 |
Operators, Expressions, and Statements | p. 91 |
Statement Basics | p. 92 |
Basic Operators | p. 95 |
Core JavaScript Statements | p. 118 |
Object-Related Statements | p. 133 |
Summary | p. 134 |
Functions | p. 137 |
Function Basics | p. 138 |
Functions as Objects | p. 148 |
Recursive Functions | p. 154 |
Using Functions | p. 156 |
Summary | p. 160 |
Objects | p. 161 |
Objects in JavaScript | p. 162 |
Creating Objects | p. 163 |
Primitive and Reference Types | p. 167 |
Object Destruction and Garbage Collection | p. 169 |
Objects as Associative Arrays | p. 170 |
Object Properties | p. 172 |
Creating User-Defined Objects | p. 174 |
JavaScript's Object-Oriented Reality | p. 180 |
Summary | p. 181 |
Array, Date, Math, and Type-Related Objects | p. 183 |
Array | p. 184 |
Boolean | p. 201 |
Date | p. 201 |
Math | p. 210 |
Number | p. 213 |
String | p. 214 |
Object Types and Primitive Types | p. 221 |
Summary | p. 221 |
Regular Expressions | p. 223 |
The Need for Regular Expressions | p. 224 |
Introduction to JavaScript Regular Expressions | p. 225 |
RegExp Object | p. 236 |
RegExp Properties | p. 240 |
String Methods for Regular Expressions | p. 245 |
Advanced Regular Expressions | p. 248 |
Limitations of Regular Expressions | p. 250 |
Summary | p. 250 |
Fundamental Client-Side JavaScript | |
Traditional JavaScript Object Models | p. 253 |
Object Model Overview | p. 254 |
The Traditional JavaScript Object Model | p. 256 |
The Document Object | p. 258 |
Putting It All Together | p. 269 |
The Object Models | p. 271 |
The Nightmare of Cross-Browser Object Support | p. 289 |
Summary | p. 290 |
The Standard Document Object Model | p. 293 |
DOM Flavors | p. 294 |
Document Trees | p. 295 |
Accessing Elements | p. 299 |
Creating Nodes | p. 308 |
Inserting and Appending Nodes | p. 309 |
Deleting and Replacing Nodes | p. 312 |
Manipulating Attributes | p. 316 |
The DOM and HTML Elements | p. 317 |
The DOM and CSS | p. 319 |
The DOM Versus DHTML Object Models | p. 331 |
Summary | p. 335 |
Event Handling | p. 337 |
Basic Event Model | p. 338 |
Modern Models | p. 356 |
DOM2 Event Model | p. 368 |
Event Model Issues | p. 376 |
Summary | p. 377 |
Using JavaScript | |
Controlling Windows and Frames | p. 381 |
Introduction to the Window Object | p. 382 |
Dialogs | p. 382 |
Opening and Closing Generic Windows | p. 387 |
Inter-Window Communication Details | p. 399 |
Controlling Windows | p. 400 |
Window Events | p. 404 |
Frames: A Special Case of Windows | p. 405 |
Window Extensions | p. 413 |
Full-Screen Windows | p. 416 |
Summary | p. 418 |
Handling Documents | p. 419 |
Historic Document Object Properties | p. 420 |
Basic Document Methods | p. 425 |
Traditional HTML Element Access with Document | p. 427 |
Document Object Model Redux | p. 436 |
DOM Table Manipulation | p. 444 |
DOM Applied | p. 455 |
Summary | p. 456 |
Form Handling | p. 457 |
The Need for JavaScript Form Checking | p. 458 |
Form Basics | p. 458 |
Form Elements | p. 462 |
Form Validation | p. 486 |
Form Usability and JavaScript | p. 497 |
Dynamic Forms | p. 505 |
Summary | p. 509 |
Image Effects: Rollovers, Positioning, and Animation | p. 511 |
Image Basics | p. 512 |
Rollover Buttons | p. 516 |
CSS Positioning | p. 525 |
Cross-Browser Layers | p. 532 |
Applied DHTML | p. 543 |
Summary | p. 557 |
Navigation and Site Visit Improvements | p. 559 |
Implementation Issues | p. 560 |
Pull-Down Menus | p. 561 |
Complex Menu Systems | p. 564 |
Navigation Assistance with Cookies | p. 592 |
Summary | p. 605 |
Controlling the Browser | p. 607 |
Browser Detection Basics | p. 608 |
Browser Sensing Basics: The Navigator Object | p. 608 |
What to Detect | p. 612 |
Advanced Detection Techniques | p. 622 |
Browser Detection in Practice | p. 625 |
Browser Control | p. 625 |
Summary | p. 633 |
Advanced Topics | |
JavaScript and Embedded Objects | p. 637 |
Java | p. 638 |
Plugins | p. 645 |
ActiveX | p. 656 |
Summary | p. 661 |
Server-Side JavaScript | p. 663 |
Server-Side JS Overview | p. 664 |
Netscape Server-Side JavaScript | p. 664 |
ASP Overview | p. 672 |
Other JavaScript Uses | p. 685 |
Summary | p. 686 |
JavaScript and XML | p. 687 |
Overview of XML | p. 688 |
XML Presentation | p. 695 |
The DOM and XML | p. 700 |
Internet Explorer's XML Data Islands | p. 711 |
Summary | p. 715 |
Real World JavaScript | |
JavaScript Security | p. 719 |
The JavaScript Security Model | p. 720 |
Security Problems with JavaScript | p. 739 |
Summary | p. 743 |
Netscape Extensions and Considerations | p. 745 |
Core Language Issues | p. 746 |
Browser Issues | p. 751 |
Summary | p. 757 |
Internet Explorer Extensions and Considerations | p. 759 |
Core Language Issues | p. 760 |
Browser Issues | p. 764 |
Proprietary Features | p. 773 |
Summary | p. 801 |
JavaScript Practices | p. 803 |
Errors | p. 804 |
Debugging | p. 807 |
Defensive Programming | p. 819 |
Coding Style | p. 836 |
Speeding up Your Code | p. 837 |
Protecting Your Code | p. 838 |
JavaScript's Place on the Web | p. 840 |
Summary | p. 841 |
Appendixes | |
Core Syntax Quick Reference | p. 845 |
Operators | p. 858 |
Flow Control Constructs | p. 866 |
Exceptions | p. 869 |
Regular Expressions | p. 870 |
JavaScript Object Reference | p. 875 |
General References | p. 876 |
Object Models | p. 876 |
Core Property Reference | p. 883 |
JavaScript Object Reference | p. 907 |
Reserved Words | p. 1043 |
Index | p. 1047 |
Table of Contents provided by Syndetics. All Rights Reserved. |