欢迎来到天天文库
浏览记录
ID:7273826
大小:592.56 KB
页数:38页
时间:2018-02-10
《ajax in action first steps with ajax》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、iTePub.Net-CollectFirststepswithAjaxThischaptercovers■IntroducingthetechnologiesbehindAjax■UsingCascadingStyleSheetstodefinelookandfeel■UsingtheDocumentObjectModeltodefinetheuserinterfacestructure■UsingXMLHttpRequesttoasynchronouslycontacttheserver■Puttingt
2、hepiecestogether31LicensedtojonathanzhengiTePub.Net-Collect32CHAPTER2FirststepswithAjaxInchapter1wefocusedonusersandhowAjaxcanassistthemintheirdailyactiv-ities.Mostofusaredevelopers,andso,havingconvincedourselvesthatAjaxisaGoodThing,wene
3、edtoknowhowtoworkwithit.Thegoodnewsisthat,aswithmanybrand-new,shinytechnologies,mostofthisprocesswillbereasonablyfamiliaralready,particularlyifyou’veworkedwiththeInternet.Inthischapter,we’llexplaintheAjaxtechnology.We’lldiscussthefourtechnologicalcornerston
4、esofAjaxandhowtheyrelatetooneanother,usingcodeexamplestodemonstratehoweachtechnologyworksandhoweverythingfitstogether.Youmightliketothinkofthischapterasthe“helloworld”sectionofthebook,inwhichweintroducethecoretechnologiesusingsomesimpleexamples.We’remoreint
5、erestedhereinjustgettingthingstowork;we’llstarttolookatthebiggerpictureinchapter3.Ifyou’realreadyfamiliarwithsomeoralloftheAjaxtech-nologies,youmaywanttoskimthesesections.Ifyou’renewtoAjaxandtowebclientprogramming,theseintroductionsshouldbesufficienttoorien
6、tyoufortherestofthebook.2.1ThekeyelementsofAjaxAjaxisn’tasingletechnology.Rather,it’sacollectionoffourtechnologiesthatcomplementoneanother.Table2.1summarizesthesetechnologiesandtherolethateachhastoplay.Table2.1ThekeyelementsofAjaxJavaScriptJavaScriptisagene
7、ral-purposescriptinglanguagedesignedtobeembeddedinsideapplications.TheJavaScriptinterpreterinawebbrowserallowsprogrammaticinter-actionwithmanyofthebrowser’sinbuiltcapabilities.AjaxapplicationsarewritteninJavaScript.CascadingStyleCSSoffersawayofdefiningreusa
8、blevisualstylesforwebpageelements.ItoffersaSheets(CSS)simpleandpowerfulwayofdefiningandapplyingvisualstylingconsistently.InanAjaxapplication,thestylingofauserinterfacemaybemodifiedinteractivelythroughC
此文档下载收益归作者所有