UML,OOP,面向对象
Figure6.Screenshot:
Frames
Figure7.Screenshot:MultipleWindowstogether.Framescanbesetscrollableorunscrollable,andeachframemaintainsitsownscrollpositionindependently.Webpagesindifferentframescanaffecteachotherbyusingclientsidescriptsorprograms.Changesthatcanbedoneincludespresentationappearanceandchangingthewebpagedisplayinginanotherframe.Scriptsandprogramsindifferentframesmayalsointeractwitheachothertocre-atecomplicatedreactivebehavior.
3.7NavigationofMultipleWindows
Multiplebrowserwindowscanbeusedtosupportcon-currentviewingofwebpagesinanotherway(Figure7).Windowsdiffersfromframesinthesensethattheycanbecreatedordestroyedindependentlyatdifferenttime,andtheyaremanagedbytheoperatingsystemswindowsman-ager.Clientsidescriptandprogramscanaffectmultiplewindowsinthesamewayasinmultipleframes.
3.8DynamicContent
Thecontentandhyperlinksofawebpagecanbedy-namicwhileviewing.Therearetwolevelsofdynamics,
clientsideandserverside.3.8.1ServerSide
Anexampleofthiskindofdynamicwebpageisthesearchresultpageofasearchengine.Whendifferentsearchstringsareentered,differenthyperlinkswillappearintheresultspagedependingonthekeywordinputedinthesearch.ThiskindofdynamicwebpagegenerationisusedextensivelyintheWWWtoday.
Thisisdonebythewebservergivingoutdifferentwebpagestorequestsofthesamehyperlinktarget(sameURL).UsersactivatingthesamehyperlinkofthesametargettwicemaynotgetthesamereturnedHTML.ServersidescriptsandCGIprogramscanbeusedtogeneratethesewebpages.Atemplateisusedtode nethestructureofthedocumentandcontentis lledinruntime.Thismakesthereturnedwebpagehavesimilarstructurebutwithdifferentcontentandhyperlinks.Notethateveryscriptorprogramcanusemorethanonewebpagetemplateandeverytemplatecanbeusedbymorethanonescriptorprogram.
Serversidedynamicpagegenerationcanalsoemploywebforms,asintheabovesearchengineexample.Thesourcewebpagewillcontainaformwithdata,whentheformissubmittedandthenewpagerequested,theformdataissentalongtothewebserverandanewwebpageisre-turned.Thisisequivalenttoactivatingahyperlinkwithruntimegeneratedparametersinthesourcewebpage,andthenapropertargetwebpageisconstructedinthewebserverandreturnedbasedontheparameters.3.8.2ClientSide
AnexampleofclientsidedynamicwebpageisaJavapro-gramonawebpage.TheJavaprogrammayhaveascrollinglistofhyperlinks,thoselinksscrolledoutofviewcannotbeactivatedwhilethosenewlyscrolledintoviewcanbeacti-vated.
Intheseclientsidedynamicpages,thetargetofahyper-linkcanbedynamicallyde ned,enabled,ordisabledwhileawebpageisdisplaying,withoutcontactingthewebserver.Basedonuserselectionsorotherexternalfactorssuchascurrenttime,thetargetofahyperlinkcanbedifferentwhenitisactivated.Thiskindofwebnavigationissupportedinvariousclientsidescriptsandprograms,suchasJavaScriptandJava.Thesescriptsandprogramshavetheirownstateandreactivebehavior,andcanaffectthecontentandnaviga-tionofthehostingwebpage.Theycannotexecutewithoutahostingwebpage.
Aspecialpropertyoftheseclientsidescriptsandpro-gramisthattheirlifetimeisthesameasthewebpagehost-ingthem.Ifthewebpageisreplacedbyanotherorwindowisclosed,alltheattachedscriptsandprogramswillbeter-minatedimmediately.
…… 此处隐藏:1075字,全部文档内容请下载后查看。喜欢就下载吧 ……