文档介绍:JavaScript™ Phrasebook - Essential Code mands
Table Of Contents
1. JavaScript™ Phrasebook: Essential Code mands 7
2. Table of Contents 7
3. Copyright 11
About the Author 13
4. Introduction 14
5. Chapter 1. JavaScript Basics 16
Understanding JavaScript (and Its History) 16
Setting Up a Test System 17
Configuring Web Browsers 19
Including JavaScript Code 19
Using External JavaScript Files 21
Dynamically Loading JavaScript Files 21
Using JavaScript Pseudo URLs 22
Executing JavaScript with Event Handlers 23
Coping with Browsers without JavaScript 24
6. Chapter 2. Common Phrases 25
Detecting the Browser Type 26
Checking Browser Capabilities 28
Preventing Caching 29
Redirecting the Browser 29
Reloading the Page 30
Creating a Random Number 30
Date and Time Information 30
Searching with Regular Expressions 33
Replacing Text 33
Navigating within the Browser's History 34
Displaying the Modification Date of the Page 34
Retrieving GET Parameters 34
Asking for User Confirmation 36
Asking for User Data 36
7. Chapter 3. Images and Animations 37
Creating Mouseover Buttons 38
Preloading Images 40
Animating Graphics 41
Stretching Graphics 43
Visualizing the Page Loading State with a Progress Bar 44
8. Chapter 4. CSS 46
Accessing CSS Styles 47
Accessing CSS Classes 48
Accessing Individual Style Sheets 49
Accessing Individual CSS Rules 50
Letting the Contents of a Website Disappear 53
Applying JavaScript to CSS Selectors 55
Changing the Mouse Cursor 57
9. Chapter 5. DOM and DHTML 58
Understanding DOM 59
Understanding DHTML 60
Accessing Specific Elements 60
Accessing Tags 61
Determining Node Information 62
Removing Elements 64
Adding Elements 65
Creating Text Elements 67
Working with Attributes 67
Cloning Elements 69
Replacing