| |
| |
Introduction | |
| |
| |
| |
A Sound Foundation | |
| |
| |
| |
Getting the Basics Right | |
| |
| |
Introducing JavaScript | |
| |
| |
JavaScript in Context | |
| |
| |
Selecting the Right Technology | |
| |
| |
JavaScript, Jscript, and ECMAScript | |
| |
| |
Let's Get Started | |
| |
| |
Data Types | |
| |
| |
Some Useful Tools | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Working with Data | |
| |
| |
Simple Data Storage | |
| |
| |
Operators | |
| |
| |
JavaScript Operators | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Functions and Statements | |
| |
| |
User Defined Functions | |
| |
| |
Predefined Global Functions | |
| |
| |
What Is a Statement? | |
| |
| |
Control Statements | |
| |
| |
Loop Statements | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
JavaScript Is Object-Based | |
| |
| |
Understanding Objects | |
| |
| |
Client-Side JavaScript Objects | |
| |
| |
The document Object | |
| |
| |
Environment Objects | |
| |
| |
Core JavaScript Objects | |
| |
| |
Exploring an Object | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
An Introduction to Arrays | |
| |
| |
What Is an Array? | |
| |
| |
Creating an Array | |
| |
| |
Accessing Arrays | |
| |
| |
Array Properties | |
| |
| |
Array Methods | |
| |
| |
Associative Arrays | |
| |
| |
Storing Objects in Array Elements | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
HTML Forms and the String Object | |
| |
| |
Collecting Data from HTML Forms | |
| |
| |
Form Elements | |
| |
| |
The String Object | |
| |
| |
Checking User Input | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Numbers and Math | |
| |
| |
The Number Object | |
| |
| |
The Math Object | |
| |
| |
Predefined Properties | |
| |
| |
Methods of the Math Object | |
| |
| |
Creating Your Own Math Functions | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Let's Take It Further | |
| |
| |
| |
The Browser Issue | |
| |
| |
Different Browsers, Different JavaScript | |
| |
| |
Cross-Browser Compatible Scripting | |
| |
| |
The W3C DOM | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Date and Time Manipulation | |
| |
| |
JavaScript and Dates | |
| |
| |
The Date Object | |
| |
| |
Date Formatting | |
| |
| |
Time Formatting | |
| |
| |
Converting Date and Time Formats | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Events and Event Handling | |
| |
| |
Understanding Events | |
| |
| |
Creating an Event Handler | |
| |
| |
Types of Events | |
| |
| |
How to Handle Events | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Dynamic HTML | |
| |
| |
What is DHTML? | |
| |
| |
Using Cascading Style Sheets | |
| |
| |
Working with Layers | |
| |
| |
Changing Attributes of an HTML Element | |
| |
| |
Moving Things | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Windows and Frames | |
| |
| |
What Are Windows and Frames? | |
| |
| |
Determining Window Location | |
| |
| |
Working with Window History | |
| |
| |
Working with the Status Line | |
| |
| |
Using the Screen Object | |
| |
| |
Working with Frames | |
| |
| |
Working with Popups | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Regular Expressions Make It Easier | |
| |
| |
Why Regular Expressions Are Useful | |
| |
| |
What Is a Regular Expression? | |
| |
| |
Some Simple Patterns | |
| |
| |
Regular Expressions Overview | |
| |
| |
Defining Regular Expressions | |
| |
| |
Quantifiers | |
| |
| |
The Methods of the RegExp Object | |
| |
| |
The Properties of the RegExp Object | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Advanced Array Management | |
| |
| |
The Array Object's Methods | |
| |
| |
Multidimensional Arrays | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Advanced Topics | |
| |
| |
| |
Debugging and Error Handling | |
| |
| |
Preventing and Classifying JavaScript Errors | |
| |
| |
Finding Syntax Errors | |
| |
| |
Debugging Load-Time Errors | |
| |
| |
Debugging Run-Time Errors I: Discrete Events | |
| |
| |
Debugging Run-Time Errors II: Continuous Events | |
| |
| |
Advanced Debugging Techniques | |
| |
| |
Using JavaScript Debuggers | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Cookies: Storing Persistent Data | |
| |
| |
Maintaining State | |
| |
| |
Cookies: An Introduction | |
| |
| |
Using Cookies | |
| |
| |
Other State Maintenance Options | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Privacy and Security | |
| |
| |
Privacy for Web Users | |
| |
| |
Privacy for Webmasters | |
| |
| |
Privacy Impact on JavaScript | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Plugins and Applets | |
| |
| |
Plugins Versus Applets | |
| |
| |
Detecting Plugin Installation | |
| |
| |
Working with Plugin Objects | |
| |
| |
Working with Applets | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
Creating Your Own Objects | |
| |
| |
What Is a Custom Object? | |
| |
| |
Use of the Constructor to Create Objects | |
| |
| |
Creating an Instance of a Custom Object | |
| |
| |
Creating Object Methods | |
| |
| |
Linking Objects Together | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
JavaScript in E-Commerce | |
| |
| |
Requirements for an E-Commerce Site | |
| |
| |
Shop Structure | |
| |
| |
The Online Catalog | |
| |
| |
Shopping Carts | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
| |
JavaScript and SVG | |
| |
| |
Overview of Scalable Vector Graphics | |
| |
| |
Example SVG Code | |
| |
| |
The SVG Document Object Model | |
| |
| |
Using JavaScript in SVG | |
| |
| |
JavaScript Beyond Declarative Animation | |
| |
| |
Interaction Between the HTML and SVG DOM | |
| |
| |
Finding Out More About SVG | |
| |
| |
Summary | |
| |
| |
Workshop | |
| |
| |
Appendixes | |
| |
| |
| |
New Features in JavaScript 1.5 | |
| |
| |
Number Formatting Additions | |
| |
| |
Runtime Error Messages | |
| |
| |
Regular Expressions | |
| |
| |
Conditional Function Declarations | |
| |
| |
Functions Can Be Declared Within an Expression | |
| |
| |
Multiple Catch Clauses | |
| |
| |
| |
Color Codes | |
| |
| |
Color Names Specified as Plain-Language | |
| |
| |
Hexadecimal Color Value | |
| |
| |
RGB Color Values | |
| |
| |
| |
Functions Reference | |
| |
| |
abs () | |
| |
| |
acos () | |
| |
| |
asin () | |
| |
| |
atan () | |
| |
| |
atan2 () | |
| |
| |
atob () | |
| |
| |
Boolean () | |
| |
| |
btoa () | |
| |
| |
captureEvents () | |
| |
| |
catch () | |
| |
| |
ceil () | |
| |
| |
cos () | |
| |
| |
Date () | |
| |
| |
decodeURI () | |
| |
| |
decodeURIComponent () | |
| |
| |
encodeURI () | |
| |
| |
encodeURIComponent () | |
| |
| |
Error () | |
| |
| |
escape () | |
| |
| |
eval () | |
| |
| |
exp () | |
| |
| |
floor () | |
| |
| |
Function () | |
| |
| |
GetObject () | |
| |
| |
handleEvent () | |
| |
| |
isFinite () | |
| |
| |
isNaN () | |
| |
| |
log () | |
| |
| |
max () | |
| |
| |
min () | |
| |
| |
Number () | |
| |
| |
Object () | |
| |
| |
parseFloat () | |
| |
| |
parseInt () | |
| |
| |
pow () | |
| |
| |
random () | |
| |
| |
releaseEvents () | |
| |
| |
rgb () | |
| |
| |
round () | |
| |
| |
routeEvents () | |
| |
| |
ScriptEngine () | |
| |
| |
sin () | |
| |
| |
sqrt () | |
| |
| |
tan () | |
| |
| |
toString () | |
| |
| |
unescape () | |
| |
| |
unwatch () | |
| |
| |
watch () | |
| |
| |
| |
Resources Online | |
| |
| |
JavaScript | |
| |
| |
Java and Java Applets | |
| |
| |
HTML | |
| |
| |
CGI | |
| |
| |
| |
A Short History of JavaScript | |
| |
| |
Index | |