Fast, focused instruction for beginning Web developers W3Schools.com is the number one online education source for beginning Web developers. This attractive two-color book contains concise, highly focused tutorials in the proven W3Schools instructional format, with an easy-to-use reference of JavaScript Objects and the HTML DOM included. Novice developers will quickly learn to create interactive Web pages using the most popular Web scripting language.
- W3Schools is the top Google search result for instruction on JavaScript, HTML, CSS, and other key Web technologies; this book presents W3Schools tutorials in an easy-to-follow format for quick learning
- Features clear examples, simple explanations, and a thorough reference section covering JavaScript Objects and the HTML DOM
- Covers statements and comments; variables, operators, and comparisons; if…then statements; pop-up boxes; events and try…catch; objects, strings, arrays, and Booleans; cookies, validation, and timing; Ajax requests and XMLHTTP requests; Ajax suggest, and more
Designed to get beginning Web developers up and running as quickly as possible, Learn JavaScript and Ajax with W3Schools presents a proven, highly focused course of instruction in an easy-to-use format.
Author(s): W3Schools
Publisher: Wiley
Year: 2010
Language: English
Pages: 267
Tags: Библиотека;Компьютерная литература;HTML / CSS / JavaScript;
Learn JavaScript and Ajax with w3schools......Page 1
Table of Contents......Page 7
JavaScript......Page 15
AJAX......Page 17
How To Use This Book......Page 18
Section I JavaScript Basic......Page 21
How To Put a JavaScript into an HTML Page......Page 23
Where to Put the JavaScript......Page 26
Using an External JavaScript......Page 29
JavaScript Statements......Page 30
JavaScript Comments......Page 32
JavaScript Variables......Page 37
Assigning Values to Undeclared JavaScript Variables......Page 39
JavaScript Arithmetic......Page 40
JavaScript Arithmetic Operators......Page 41
Adding Strings and Numbers......Page 42
Comparison Operators......Page 44
Conditional Operator......Page 45
Conditional Statements......Page 46
if Statement......Page 47
if... else Statement......Page 48
if... else if... else Statement......Page 50
The for Loop......Page 53
The while Loop......Page 55
The do... while Loop......Page 57
The break Statement......Page 60
The continue Statement......Page 61
JavaScript for... in Statement......Page 62
JavaScript switch Statement......Page 64
Popup Boxes......Page 67
How to Define a Function......Page 72
JavaScript Function Examples......Page 73
The return Statement......Page 76
The Lifetime of JavaScript Variables......Page 77
onLoad and onUnload......Page 78
onSubmit......Page 79
onClick......Page 80
The try... catch Statement......Page 81
The throw Statement......Page 84
Insert Special Characters......Page 87
Break up a Code Line......Page 88
Section II JavaScript Objects......Page 91
Properties......Page 93
Methods......Page 94
String Object......Page 95
Examples......Page 96
Create a Date Object......Page 102
Compare Two Dates......Page 103
Examples......Page 104
What Is an Array?......Page 109
Modify Values in an Array......Page 110
Examples......Page 111
Create a Boolean Object......Page 121
Examples......Page 122
Mathematical Constants......Page 124
Mathematical Methods......Page 125
Examples......Page 126
What Is RegExp?......Page 129
RegExp Modifiers......Page 130
test()......Page 132
exec()......Page 133
Section III JavaScript Advanced......Page 135
Browser Detection......Page 137
The Navigator Object......Page 138
What Is a Cookie?......Page 143
Create and Store a Cookie......Page 144
Required Fields......Page 148
E-mail Validation......Page 150
The HTML Code......Page 152
The Entire Code......Page 153
HTML Image Maps......Page 155
Adding Some JavaScript......Page 156
The setTimeout() Method......Page 158
The clearTimeout() Method......Page 163
JavaScript Objects......Page 165
Creating Your Own Objects......Page 166
Section IV AJAX Basic......Page 171
The XMLHttpRequest Object......Page 173
Your First AJAX Application......Page 174
The XMLHttpRequest......Page 177
All Together Now......Page 178
Important Methods......Page 180
XMLHttpRequest Open—Using False......Page 181
The readyState Property......Page 182
The onreadystatechange Property......Page 183
Requesting Files......Page 184
Submitting Forms......Page 185
Section V: AJAX Advanced......Page 187
The HTML Form......Page 189
The showHint() Function......Page 190
The stateChanged() Function......Page 191
AJAX Suggest Source Code......Page 192
In This Chapter......Page 198
The AJAX JavaScript......Page 199
The AJAX Server Page......Page 200
In This Chapter......Page 202
The AJAX JavaScript......Page 203
The AJAX Server Page......Page 204
The XML File......Page 205
In This Chapter......Page 212
The AJAX JavaScript......Page 213
The AJAX Server Page......Page 215
Array Object......Page 217
Date Object......Page 218
Math Object......Page 220
Number Object......Page 221
String Object......Page 222
RegExp Object......Page 224
JavaScript Global Properties and Functions......Page 226
In This Appendix......Page 228
Document Object......Page 229
Event Object......Page 230
Element Object......Page 232
Anchor Object......Page 234
Area Object......Page 235
Body Object......Page 236
Form Object......Page 237
Frame/IFrame Object......Page 238
Frameset Object......Page 239
Image Object......Page 240
Checkbox Object......Page 241
FileUpload Object......Page 242
Password Object......Page 243
Radio Object......Page 244
Submit Object......Page 245
Text Object......Page 246
Meta Object......Page 247
Object Object......Page 248
Option Object......Page 249
Style Object......Page 250
Table Object......Page 255
TableCell Object......Page 256
Textarea Object......Page 257
Index......Page 259