作者:empty 页数:267 出版社:empty |
Ne part of this publication maybe reproduced, stored in a retrieval system or transmitted in anyform or by any means.c lectronic, mechanical.pho co copying, Te cording.scanning or otherwise,except as permitted under Sec i ons107or108ofthe1976Untd States Copy rgh the t, wihout(978) 750-8400, fax 49781646-8600.Requests to the Pubs her for permision should be addressedto the Permissions Departm sent, John Wiley&Sons, Inc, , 111 River Street.Hoboken, N 07030,(201) 748.111x(201) 7-600S, or on iea htp/we o:wcoagapetmiineLim if of Liablity/Dis el aimer of Warranty:The pub i her and the author make norc pte sent tionsor warranties with respect tot be accuracy or completeness of the contents of this work and spe-cif cally disclaim all warrant ics, including without limitation watr antics of fitness for a particularpupocNowanaymybecataafem ended by a csar promo ad almaen as The adv ien dsiaegescontanaJheKiibyt of be sua be tote vcysuzionThswsokssoHwih deunderstanding thar the pub i her is not engaged in rendering legal, accounting, or other professionalservie es.If prof sional ass stan ccir t equired, the services of a competent pe of esa on alpes un shouldbe su ugh.Nether the publ sher nor the author shalbe lable for damages a ring here ton Thefact that an organization or Web sitc is referred to in this work as a citation and/or a potentials out eeof urheriemLtndoeshameanhat the at ho for the pusher end as e she if omm at in heorganization or Website may provide or recommendations it may make Further, readers should bewa ehatltrntWisetieamthswak may haehanatdsapeedbawenwenh iwork was written and when it is read.
Trademarks:Wiley, the Wiley logo, andrea ted trade dress are trademarks or rog istered trade-marks of John Wiley&Sons, Inc and/or its affliates, in the United States and at her countries,and may not be used without written perms sion.w3schoolsandthew3schuos logo are registeredtrademarks of w 3 schools JavaScript is at eg istered trademark af Sun Microsystems, Inc.All othertrademarks are the property of the irrespective own ets.Wiley Publ hing.Inc.is not associated withany product or venda r mentioned in this ba ok.Wiley alo publ he sits books in a variety of electronic formats.Some content that appears in printmay not be available in electronic bao ks.Library of Cong tess CIP Datz is available from the publisher
Section I:JavaScript Basic.
CHAPTER1:JavaScriptHowToandWhereTo.
HowTo Put a JavaScript into an HTML Page.
Howto Handle Simple Browsers.
Where to Put the Java Scrip.
Using an External JavaScript.
CHAPTER2:JavaScriptStatementsandComments.16
JavaScript Statements.16
Java Scrip r Comments.18
CHAPTER3:JavaScriptVariables.23
Do You Remember Algebra from School.23
JavaScript Variables.23
Declaring(Creating) JavaScript Variables.25
Assigning Values to Undeclared JavaScript Variables.25
Re declaring JavaScript Variables.26
JavaScript Arithmetic.26
TableofContents
CHAPTER4:JavaScriptOperators.27
JavaScript Arithmetic Operators.27
JavaScript Assignment Operators.28
The+Operator Used on Strings-.28
Adding Strings and Numbers.28
CHAPTER5:JavaScriptComparisons.30
Comparison Operators.30
Howto Use Comparisons.31
Logical Operators.-31
Conditional Operator.31
CHAPTER6:JavaScriptIf.ElseStatements.32
Conditional Statements.32
if Statement.33
if.else Statement.34
if.elseif.else Statement.36
CHAPTER7:JavaScriptLoops.39
The for Loop.39
The while Loop.41
The do.while Loop-43
CHAPTER8:AdditionalJavaScriptFlowControl
Statements.46
The break Statement.46
The continue Statement.47
Java Scrip r for.in Statement.48
Java Seri pt switch Statement.50
CHAPTER9:JavaScriptPopupBoxes.
Popup Box e.
CHAPTER10:JavaScriptFunctions.
Howto Define a Function.
JavaScript Function Examples.
The return Statement.
The Lifetime of JavaScript Variables.
CHAPTER11:JavaScriptEvents.
onLoad and on Unload.
on Focus, onBlur, and on Change.
on Submit.
onMouseOver and onMouseOut.
on Clc k.
CHAPTER12:Javascripttry.catchand
throw Statements.
JavaScript-Catching Errors.
The try.catch State men.
The throw Statement.
CHAPTER13:JavaScriptSpecialCharactersand
Guidelines.
Insert Special Characters.
JavaScript Is CaseSensitive.
WhiteSpace.
Breakup a Code Line.
TableofContents
Section I:JavaScript Objects.
CHAPTER14:JavaScriptObjectsIntro.
Object-Oriented Programming-
Properties.
Methods.
CHAPTER15:JavaScriptStringObject.
String Object.
Examples.
CHAPTER16:JavaScriptDateObject.
Create aD are Object.
Set Dates.
Compare Two Dates.
Examples.
CHAPTER17:JavaScriptArrayObject.
What Is an Array?.
Create an Array.
Access an Array.
Modify Values in an Array.
Examples.
CHAPTER18:JavaScriptBooleanObject.
Create a Boolean Object.
Examples.
CHAPTER19:JavaScriptMathObject.
Math Object.
Mathematical Constants.
Mathematical Methods.
Examples.
CHAPTER20:JavaScriptRegExpObject.
What Is RegExp?.
RegExp Modifiers.
Section III:JavaScript Advanced.
CHAPTER21:JavaScripBrowserDetection.
Browser Detection.
The Navigator Object.
CHAPTER22:JavaScriptCookies.
What Is a Cookie.
Create and Store a Cookie.
CHAPTER23:JavaScriptFormValidation.
Required Fields.
E-mail Validation.
TableofContents
CHAPTER24:JavaScriptAnimation.
The HTML Code.
The JavaScript Code.
The Entire Code.
CHAPTER25:JavaScriptImageMaps.
HTML ImageMaps.
Adding Some JavaScript.
CHAPTER26:JavaScriptTimingEvents.
The setTimeout(Method.
The clearTimeout) Method.
CHAPTER27:CreateYourOwnObjects
with JavaScript.
JavaScript Objects.
Creating Your Own Objects.
Section IV:AJAX Basic.
CHAPTER28:AJAXXMLHttpRequest.
AJAX Uses the XMLHttpRequest Object.
The XMLHttpRequest Objec.
Your First AJAX Application.
CHAPTER29:AJAXBrowserSupport.
The XMLHttpRequest.
All Together Now.
CHAPTER30:AJAX-TheXMLHttpRequest
Objects Methods and Properties.
Important Methods.
Sending an AJAX Request to a ServeT-.
Important Properties.
The response Text Property.
XMLHttpRequest Open-Using False.
XMLHttpRequest Open-Using True.
The ready State Property.
The on ready state change Property.
CHAPTER31:AJAXServer.
XMLHttpRequest Object Can Request Any Data.
Requesting Files.
Submitting Forms.
Section V:AJAX Advanced
cHAPTER32:AJAXSuggest.
The HTML Form.
The show Hi nrO Function.
The Get XmlHttp Object() Function.
The state Changed 0 Function.
AJAX Suggest SourceCode.
CHAPTER33:AJAXDatabaseExample.
The AJAX JavaScript.
The AJAX Server Pag