CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 08 Aug 2025 01:39:35 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20070324212635
location: https://web.archive.org/web/20070324212635/https://www.oreilly.com/catalog/jscript2/toc.html
server-timing: captures_list;dur=0.499399, exclusion.robots;dur=0.015477, exclusion.robots.policy;dur=0.007147, esindex;dur=0.009824, cdx.remote;dur=11.014806, LoadShardBlock;dur=164.892387, PetaboxLoader3.datanode;dur=64.808631, PetaboxLoader3.resolve;dur=39.181104
x-app-server: wwwb-app212
x-ts: 302
x-tr: 199
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app212; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Fri, 08 Aug 2025 01:39:36 GMT
content-type: text/html
x-archive-orig-date: Sat, 24 Mar 2007 21:26:35 GMT
x-archive-orig-server: Apache
x-archive-orig-p3p: policyref="https://www.oreillynet.com/w3c/p3p.xml",CP="CAO DSP COR CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa CONo OUR DELa PUBi OTRa IND PHY ONL UNI PUR COM NAV INT DEM CNT STA PRE"
x-archive-orig-last-modified: Sun, 05 Nov 2006 07:04:24 GMT
x-archive-orig-etag: "6d01f0-3e7c-454d8cf8"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 15996
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: iso-8859-1
memento-datetime: Sat, 24 Mar 2007 21:26:35 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 12 Feb 1998 22:55:22 GMT", ; rel="prev memento"; datetime="Sat, 24 Jun 2006 21:33:37 GMT", ; rel="memento"; datetime="Sat, 24 Mar 2007 21:26:35 GMT", ; rel="last memento"; datetime="Sat, 24 Mar 2007 21:26:35 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 38_0_20070324203901_crawl28-c/38_0_20070324212512_crawl22.arc.gz
server-timing: captures_list;dur=0.646925, exclusion.robots;dur=0.024047, exclusion.robots.policy;dur=0.011001, esindex;dur=0.013828, cdx.remote;dur=20.343393, LoadShardBlock;dur=131.295240, PetaboxLoader3.datanode;dur=90.377176, PetaboxLoader3.resolve;dur=89.318452, load_resource;dur=112.952035
x-app-server: wwwb-app212
x-ts: 200
x-tr: 308
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
oreilly.com -- Online Catalog: JavaScript: The Definitive Guide, Second Edition
Cover | Table of Contents | Index
Table of Contents
Preface xi Chapter 1 Introduction to JavaScript 1 1.1 Executable Content: JavaScript in a Web Page 2 1.2 JavaScript Myths 4 1.3 What JavaScript Can Do 5 1.4 What JavaScript Can't Do 10 1.5 An Example: Calculating Your Taxes with JavaScript 10 1.6 Flavors and Versions of JavaScript 16 1.7 JavaScript Security 20 1.8 Using the Rest of This Book 20 1.9 Exploring JavaScript 22 Part 1 Core JavaScript 25 Chapter 2 Lexical Structure 27 2.1 Case Sensitivity 27 2.2 Whitespace and Line Breaks 28 2.3 Optional Semicolons 29 2.4 Comments 29 2.5 Literals 29 2.6 Identifiers 33 2.7 Reserved Words 34 Chapter 3 Variables and Data Types 37 3.1 Variables 37 3.2 Numbers 39 3.3 Strings 41 3.4 Boolean Values 42 3.5 Functions 43 3.6 Objects 44 3.7 Arrays 45 3.8 Null 45 3.9 Undefined 45 3.10 The Date Object 46 3.11 Data Type Wrapper Objects 47 Chapter 4 Expressions and Operators 49 4.1 Expressions 49 4.2 Operator Overview 50 4.3 Arithmetic Operators 53 4.4 Comparison Operators 55 4.5 String Operators 57 4.6 Logical Operators 59 4.7 Bitwise Operators 59 4.8 Assignment Operators 61 4.9 Miscellaneous Operators 63 Chapter 5 Statements 69 5.1 Expression Statements 69 5.2 Compound Statements 70 5.3 if 71 5.4 while 73 5.5 for 74 5.6 for...n 75 5.7 break 76 5.8 continue 77 5.9 with 77 5.10 var 79 5.11 function 80 5.12 return 81 5.13 The Empty Statement 82 5.14 Summary of JavaScript Statements 82 Chapter 6 Functions 85 6.1 Defining and Invoking Functions 85 6.2 Functions as Data Types 87 6.3 The Function Object 90 6.4 Built-in Functions 98 6.5 Event Handlers 98 Chapter 7 Objects 101 7.1 Object Properties 101 7.2 Creating New Objects with Constructors 102 7.3 Methods 104 7.4 Object Prototypes 106 7.5 Classes in JavaScript 110 7.6 Objects as Associative Arrays 114 7.7 Special Object Methods 116 Chapter 8 Arrays 121 8.1 Array Elements 121 8.2 Multidimensional Arrays 123 8.3 Array/Object Dual Nature 123 8.4 Creating Arrays 124 8.5 Array Length Property 125 8.6 Array Methods 126 8.7 Arrays in Navigator 2.0 128 8.8 Built-in Arrays 130 8.9 Array Summary 130 Chapter 9 Further Topics in JavaScript 133 9.1 Automatic Data Type Conversion 133 9.2 Explicit Data Type Conversions 141 9.3 By Value vs. By Reference 144 Part 2 Client-Side JavaScript 153 Chapter 10 Client-Side Program Structure 155 10.1 The <\|SCRIPT\|> Tag 156 10.2 Including JavaScript Files 159 10.3 JavaScript and Events 160 10.4 JavaScript in URLs 165 10.5 JavaScript Entities 166 10.6 Execution of JavaScript Programs 167 10.7 JavaScript and Threads 172 Chapter 11 Windows and the JavaScript Name Space 175 11.1 The Implicit Window Reference 175 11.2 Multiple Windows and Explicit Window References 176 11.3 Windows and Frames 179 11.4 Window and Frame Names 181 11.5 The JavaScript Name Space 182 11.6 Window and Variable Lifetime 186 11.7 Garbage Collection 187 11.8 The JavaScript Object Hierarchy 192 Chapter 12 Programming with Windows 195 12.1 Simple Dialogs 195 12.2 Opening and Closing Windows 197 12.3 The Status Line 200 12.4 Frame Programming Techniques 203 12.5 Other Window Programming Techniques 207 Chapter 13 The Navigator, Location, and History Objects 209 13.1 The Navigator, MimeType, and Plugin Objects 209 13.2 The Location Object 213 13.3 The History Object 215 Chapter 14 Documents and Their Contents 219 14.1 The Document Object 219 14.2 The Link Object 226 14.3 The Anchor Object 229 14.4 The JavaObject Object 229 Chapter 15 Saving State with Cookies 231 15.1 An Overview of Cookies 231 15.2 Reading Cookies 233 15.3 Storing Cookies 233 15.4 Cookie Limitations 234 15.5 Cookie Example 235 Chapter 16 Special Effects with Images 239 16.1 Image Replacement with the Image.src Property 239 16.2 Off-Screen Images and Caching 240 16.3 Image Event Handlers 241 16.4 Other Image Properties 242 16.5 Image Replacement Example 243 16.6 Other Image Techniques 247 Chapter 17 Forms and Form Elements 249 17.1 Forms in CGI and JavaScript 249 17.2 The Form Object 250 17.3 Form Elements 252 17.4 Form Element Names and Values 257 17.5 Naming Forms and Form Elements 259 17.6 Form Verification Example 261 Chapter 18 Compatibility Techniques 265 18.1 Platform, Browser, and Version-Specific Compatibility 266 18.2 Compatibility with Non-JavaScript Browsers 269 18.3 Compatibility with JavaScript 1.0 Browsers 274 18.4 Compatibility Through CGI Scripts 280 Chapter 19 LiveConnect: JavaScript and Java 281 19.1 Overview of LiveConnect 281 19.2 LiveConnect Data Types 282 19.3 LiveConnect Data Conversion 288 19.4 JavaScript Conversion of JavaObjects 293 19.5 Scripting Java with JavaScript 295 19.6 Using JavaScript from Java 299 19.7 Working with Java in Internet Explorer 306 19.8 Summary 308 Chapter 20 JavaScript Security 311 20.1 JavaScript and Security 311 20.2 Security Holes and Security Hobbles 313 20.3 The domain Property 317 20.4 The Data-Tainting Security Model 317 Part 3 Reference 323 Part 4 Appendices 579 A JavaScript Resources on the Internet 581 B Known Bugs 585 C Differences between Navigator 2.0 and 3.0 599 D JavaScript Incompatibilities in Internet Explorer 3.0 605 E A Preview of Navigator 4.0 611 F Persistent Client State: HTTP Cookies 615 G JavaScript and HTML Color Names and Values 623 H LiveConnected Navigator Plug-Ins 627 Index 631
Return to JavaScript: The Definitive Guide
About O'Reilly | Contact | Jobs | Press Room | How to Advertise | Privacy Policy
© 2006, O'Reilly Media, Inc.
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.