资源描述:
《毕业论文外文翻译-jQquery的介绍》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、外文原文TheIntroductionOfjQueryWhatjQuerydoesThejQuerylibraryprovidesageneral-purposeabstractionlayerforcommonwebscripting,andisthereforeusefulinalmosteveryscriptingsituation.Itsextensiblenaturemeansthatwecouldnevercoverallpossibleusesandfunctionsinasinglebook,aspluginsarecons
2、tantlybeingdevelopedtoaddnewabilities.Thecorefeatures,though,addressthefollowingneeds:Accesselementsinadocument.WithoutaJavaScriptlibrary,manylinesofcodemustbewrittentotraversetheDocumentObjectModel(DOM)tree,andlocatespecificportionsofanHTMLdocument'sstructure.Arobustandef
3、ficientselectormechanismisofferedinjQueryforretrievingtheexactpieceofthedocumentthatistobeinspectedormanipulated.Modifytheappearanceofawebpage.CSSoffersapowerfulmethodofinfluencingthewayadocumentisrendered,butitfallsshortwhenwebbrowsersdonotallsupportthesamestandards.Withj
4、Query,developerscanbridgethisgap,relyingonthesamestandardssupportacrossallbrowsers.Inaddition,jQuerycanchangetheclassesorindividualstylepropertiesappliedtoaportionofthedocumentevenafterthepagehasbeenrendered.Alterthecontentofadocument.Notlimitedtomerecosmeticchanges,jQuery
5、canmodifythecontentofadocumentitselfwithafewkeystrokes.Textcanbechanged,imagescanbeinsertedorswapped,listscanbereordered,ortheentirestructureoftheHTMLcanberewrittenandextended—allwithasingleeasy-to-useApplicationProgrammingInterface(API).Respondtoauser'sinteraction.Eventhe
6、mostelaborateandpowerfulbehaviorsarenotusefulifwecan'tcontrolwhentheytakeplace.ThejQuerylibraryoffersanelegantwaytointerceptawidevarietyofevents,suchasauserclickingonalink,withouttheneedtocluttertheHTMLcodeitselfwitheventhandlers.Atthesametime,itsevent-handlingAPIremovesbr
7、owserinconsistenciesthatoftenplaguewebdevelopers.Retrieveinformationfromaserverwithoutrefreshingapage.ThiscodepatternhasbecomeknownasAsynchronousJavaScriptAndXML(AJAX),andassistswebdevelopersincraftingaresponsive,feature-richsite.SimplifycommonJavaScripttasks.Inadditiontoa
8、llofthedocument-specificfeaturesofjQuery,thelibraryprovidesenhancementstobasicJavaScriptc