JavaScript for Web Developers.pdf
ProfessionalJavaScriptforWebDevelopers
ProfessionalJavaScriptmforWebDevelopers
Nicholasc.zakas
(
WILEY
WileyPublishingInc
ProfessionalJavaScriptforWebDevelopers
Copyrighto2005byWileypublishingInc.Allrightsreserved
PublishedbyWileyPublishing,Inc,Indianapolis,Indiana
PublishedsimultaneouslyinCanada
Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedinanyform
orbyanymeans,electronic,mechanical,photocopying,recording,scanning,orotherwise,exceptas
permittedunderSection107or108ofthe1976UnitedStatesCopyrightAct,withouteithertheprior
writtenpermissionofthePublisher,orauthorizationthroughpaymentoftheappropriateper-copyfee
totheCopyrightClearanceCenter,Inc,222RosewoodDrive,Danvers,MAO1923,(978)750-8400,fax
(978)646-8700RequeststothePublisherforpermissionshouldbeaddressedtotheLegalDepartment,
WileyPublishing,Inc,10475CrosspointBlvd.Indianapolis,IN46256,(317)572-3447,fax(317)
572-4355,oronlineatwww.wiley.com/go/permissions
LIMITOFLIABILITY/DISCLAIMEROFWARRANTY:THEPUBLISHERANDTHEAUTHOR
MAKENOREPRESENTATIONSORWARRANTIESWITHRESPECTTOTHEACCURACYOR
COMPLETENESSOFTHECONTENTSOFTHISWORKANDSPECIFICALLYDISCLAIMALL
WARRANTIES,INCLUDINGWITHOUTLIMITATIONWARRANTIESOFFITNESSFORAPARTIC
ULARPURPOSE.NOWARRANTYMAYBECREATEDOREXTENDEDBYSALESORPROMO-
TIONALMATERIALS.THEADVICEANDSTRATEGIESCONTAINEDHEREINMAYNOTBE
SUITABLEFOREVERYSITUATION.THISWORKISSOLDWITHTHEUNDERSTANDINGTHAT
THEPUBLISHERISNOTENGAGEDINRENDERINGLEGAL,ACCOUNTING,OROTHERPRO
FESSIONALSERVICES.IFPROFESSIONALASSISTANCEISREQUIRED,THESERVICESOFA
COMPETENTPROFESSIONALPERSONSHOULDBESOUGHT.NEITHERTHEPUBLISHERNOT
THEAUTHORSHALLBELIABLEFORDAMAGESARISINGHEREFROM.THEFACTTHATAN
ORGANIZATIONORWEBSITEISREFERREDTOINTHISWORKASACITATIONAND/ORA
POTENTIALSOURCEOFFURTHERINFORMATIONDOESNOTMEANTHATTHEAUTHOROR
THEPUBLISHERENDORSESTHEINFORMATIONTHEORGANIZATIONORWEBSITEMAY
PROVIDEORRECOMMENDATIONSITMAYMAKE.FURTHER,READERSSHOULDBEAWARE
THATINTERNETWEBSITESLISTEDINTHISWORKMAYHAVECHANGEDORDISAPPEARED
BETWEENWHENTHISWORKWASWRITTENANDWHENITISREAD
ForgeneralinformationonourotherproductsandservicespleasecontactourCustomerCareDepart
mentwithintheUnitedStatesat(800)762-2974,outsidetheUnitedStatesat317)572-3993orfax(317)
572-4002
Trademarks:Wiley,theWileyPublishinglogo,Wrox,theWroxlogo,andProgrammertoProgrammer
trademarkofSunMicrosystems,IncintheUnitedStatesandothercountries.Allothertrademarks?
aretrademarksorregisteredtrademarksofJohnWileySons,Incand/oritsaffiliates.JavaScript
thepropertyoftheirrespectiveowners.WileyPublishing,Inc.isnotassociatedwithanyproductor
vendormentionedinthisbook
Wileyalsopublishesitsbooksinavarietyofelectronicformats.Somecontentthatappearsinprint
maynotbeavailableinelectronicbooks
LibraryofCongressCataloging-in-PublicationDataisavailablefromthepublisher
ISBN-13:978-0-7645-7908-0
ISBN-10:0-7645-7908-8
PrintedintheUnitedStatesofamerica
10987654321
Abouttheauthor
NicholasC.zakasisauserinterfacedesignerforWebapplications,specializinginclient-sidetechnolo
giessuchasJavaScript,HTML,andCSS.NicholascurrentlyworksasSeniorSoftwareEngineer,Design
Engineering,atMatrixOne,Inc.locatedinWestford,Massachusetts,USA
NicholashasaB.S.inComputerSciencefrommerrimackCollege,wherehelearnedtraditionalpro-
gramminginCandC++.Duringcollege,hebeganinvestigatingtheWorldwideWebandhTmLinhis
sparetime,eventuallyteachinghimselfenoughtobehiredasWebmasterofasmallsoftwarecompany
namedRadnet,IncinWakefield,Massachusetts,USA.ItwastherethatNicholasbeganlearning
JavaScriptandworkingonWebapplications
NicholascanbereachedthroughhisWebsitehttp://www.nczonline.net/
Credits
VicePresidentandExecutiveGroupPublisher:
DevelopmentEditor:
Richardwadley
SharonNash
VicePresidentandpublisher:
Seniorproductioneditor
JosephBLikert
Angelasmith
AcquisitionsEditor
Technicaleditor:
JimMintel
Jean-LucDavid,Wiley-DreamtechIndiaPvtLtd
EditorialManager
TextDesignComposition:
MarybethWakefield
Wileycompositionservices
Acknowledgments
Ittakesmorethanjustonepersontowriteabookofthisnature,despitethesinglenameonthefront
cover.Withoutthehelpofnumerousindividualsthisbookwouldnothavebeenpossible
Firstareforemost,thankstoeveryoneatWileyPublishing,especiallyJimMinatelandSharonNash,for
providingalltheguidanceandsupportthatanewauthorneeds
ThankstoallthosewhoofferedtheirideasonwhatagoodJavaScriptbookshouldinclude:Keith
Ciociola,KenFearnley,JohnRajan,andDouglasSwatski
Aspecialthankstoeveryonewhoreviewedthesubjectmatteraheadoftime:ErikArvidssonbradley
Baumann,GuilhermeBlanco,DouglasCrockford,Jean-LucDavid,EmilAEklund,BrettFielder,Jeremy
McPeak,andMichaSchopman.Allyourinputwasexcellentandmadeforamuchbetterbook
ThankstoDrs.EdandfrancesBernardforkeepingmeintip-tophealthduringthewritingofthisbook
andthepastfewyears
Last,butcertainlynotleast,thankstomyfamily,mom,dad,andGregandmyextremelyunderstanding
girlfriend,Emily.Yourloveandsupporthelpedtakemefromtheproposaltothefinalpublishedcopy.
用户评论