




已阅读5页,还剩35页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter16,TheWorldWideWeb万维网,16-2,ChapterGoals、,CompareandcontrasttheInternetandtheWorldWideWebDescribegeneralWebprocessingWritebasicHTMLdocumentsDescribeseveralspecificHTMLtagsandtheirpurposes,16-3,ChapterGoals,DescribetheprocessingofJavaappletsandJavaserverpagesCompareandcontrastHTMLandXMLDefinebasicXMLdocumentsandtheircorrespondingDTDsExplainhowXMLdocumentsareviewed,16-4,TheWorldWideWeb万维网,TheWebAninfrastructureofdistributedinformationcombinedwithsoftwarethatusesnetworksasavehicletoexchangethatinformation万维网:信息和用于访问信息的网络软件的基础设施。先有Internet,后有万维网(20世纪90年代中期)。,16-5,TheWorldWideWeb万维网,WebpageAdocumentthatcontainsorreferencesvariouskindsofdata,suchastext,images,graphics,andprogramsWeb页:包含或引用各种类型的数据的文档。,16-6,TheWorldWideWeb万维网,LinksAconnectionbetweenonewebpageandanotherthatcanbeused“movearound”asdesired链接:两个Web页之间的连接。WebsiteAcollectionofrelatedwebpagesWeb站点:一组相关的网页,通常由同一个人或公司设计和控制。,16-7,TheWorldWideWeb万维网,TheInternetmakesthecommunicationpossible,buttheWebmakesthatcommunicationeasy,moreproductive,andmoreenjoyableInternet使通信成为可能,而Web则使通信变得轻松、更丰富、更有趣。,16-8,WebBrowserWeb浏览器,BrowserAsoftwaretoolthatissuestherequestforthewebpagewewantanddisplaysitwhenitarrives浏览器:获取并显示Web页的软件工具。常用的浏览器软件有:微软的InternetExplorer开放源码的Firefox,16-9,WebBrowserWeb浏览器,Weoftentalkabout“visiting”awebsite,asifweweregoingthereIntruth,weactuallyspecifytheinformationwewant,anditisbroughttousTheconceptofvisitingasiteisunderstandableinthatweoftendontknowwhatsataparticularsiteuntilwe“gotoit”andsee我们常常说“访问”一个Web站点,就象真的到了这个网站一样。事实上,我们只是说明了想要的信息,它们就会呈现在我们面前。访问站点的概念是很容易理解的,因为在进入一个站点之前,我们通常不知道这个站点中有什么。,16-10,WebBrowserWeb浏览器,Figure16.2AbrowserretrievingaWebpage,16-11,WebBrowserWeb浏览器,WebserverThecomputerthatissetuptorespondtowebrequestsWeb服务器:用于相应Web页请求的计算机。,16-12,URL统一资源地址,URL(UniformResourceLocator)URL:说明Web地址的标准方式例子:54/,16-13,SearchEngines搜索引擎,SearchEngineAwebsitethathelpsyoufindotherwebsitesForexample,YahooandGooglearesearchenginesYouenterkeywordsandthesearchengineproducesalistiflinkstopotentiallyusefulsites搜索引擎:帮助你找到其他Web站点的站点。例如:Yahoo和Google是搜索引擎。通过输入关键字,搜索引擎就会提供一个有可能满足要求的站点的列表。,16-14,HTML超文本标识语言,Webpagesarecreated(orbuilt)usingalanguagecalledtheHypertextMarkupLanguage,orHTMLWeb页是用超文本标识语言创建的。超文本指的是不像一本书那样线性地组织信息,而是嵌入其他信息的链接,本剧需要从一个地方转到另一个地方。现在更精确的术语是超媒体,因为除了文本之外,我们还处理很多其他类型的信息,如图像、音频和视频。,16-15,HTML超文本标识语言,Thetermmarkuplanguagecomesfromthefactthattheprimaryelementsofthelanguagetaketheformoftagsthatweinsertintoadocumenttoannotatetheinformationstoredthere之所以叫做标识语言,是因为这种语言的主要元素都是插入文档的标记,用于注释存储在该处的信息。,16-16,HTML,Figure16.2Amarked-updocument,16-17,HTML,Figure16.3TheStudentDynamicsWebpageasdisplayedinNetscapeNavigator,16-18,HTML,Figure16.4TheHTMLdocumentdefiningtheStudentDynamicsWebpage,16-19,HTML,Tagsareenclosedinanglebrackets()标记都封装在尖括号中()WordssuchasHEAD,TITLE,andBODYarecalledelementsandspecifythetypeofthetag像HEAD、TITLE和BODY这样的词叫做元素。Tagsareoftenusedinpairs,withastarttagsuchasandacorrespondingendtagwitha/beforetheelementname,suchas标记通常是成对出现的,具有一个起始标记(如)和对应的结束标记(如)。,16-20,HTML,Thebrowserdetermineshowthepageshouldbedisplayedbasedonthetags浏览器将根据HTML文档中的标记决定如何显示Web页。ThebrowserIgnoresthewayweformattheHTMLdocumentusingcarriagereturns,extraspaces,andblanklinesTakesintoaccountthewidthandheightofthebrowserwindowReformatsthecontentstofityourbrowserwindow,16-21,BasicHTMLFormatting基本的HTML格式,Theparagraphtags(.)specifytextthatshouldbetreatedasaseparateparagraph段落标记说明了应该将其中的文本作为单独的段落处理。Thecentertags(.)indicatethattheenclosedinformationshouldbecenteredinthebrowserwindow居中标记说明其中的信息应该在浏览器窗口中居中显示。,16-22,BasicHTMLFormatting基本的HTML格式,TheB,I,andUelementsareusedtoindicatethattheenclosedtextshouldbebold,italic,orunderlined,respectively元素B,I和U分别说明了封装的文本以粗体、斜体显示或加下划线。Thetaginsertsahorizontalrule(thatis,aline)acrossthepage标记将在页面中插入一条水平线。,16-23,BasicHTMLFormatting基本的HTML格式,WeoftenhavecausetodisplayalistofitemsTheULelementstandsforanunorderedlist,andtheLIelementrepresentsalistitem我们通常需要显示项目列表UL元素表示无序列表,LI元素表示一个列表项。SeveralelementsareusedtodefineheadingsinadocumentTherearesixpredefinedheadingelementsdefinedinHTML:H1,H2,H3,H4,H5,andH6定义文档标题的元素有几种在HTML中有六种预定的标题元素,即H1、H2、H3、H4、H5、H6。,16-24,ImagesandLinks图像和链接,Manytagscancontainattributesthatindicateadditionaldetailsabouttheinformationorhowtheenclosedinformationshouldbedisplayed许多标记具有属性,说明了有关信息的额外细节或如何显示封装的信息。AnimagecanbeincorporatedintoawebpageusingtheIMGelement,whichtakesanattributethatidentifiestheimagefiletodisplay可以用IMG元素把图像嵌入Web页,IMG元素的属性可以标识要显示的图像文件。,16-25,ImagesandLinks图像和链接,AlinkisspecifiedusingtheelementA,whichstandsforanchor链接是用元素A声明的,A表示锚。ThetagincludesanattributecalledHREFthatspecifiestheURLofthedestinationdocument.该标记的属性HREF指定了目标文档的URL。例如:ForexampleDocumentationCentral!,16-26,InteractiveWebPages交互式Web页,WhenHTMLwasfirstdeveloped,therewasnowaytointeractwiththeinformationandpicturespresentedinawebpage当HTML首次出现时,没有办法与Web也中的信息和图片交互Asusershaveclamoredforamoredynamicweb,newtechnologiesweredevelopedtoaccommodatetheserequests由于用户强烈要求动态Web,为了满足这些要求,新的奇数出现了ManyofthenewideaswereoffshootsofthenewlydevelopedJavaprogramminglanguage许多新想法都是从新开发的Java程序设计语言衍生出来的,16-27,JavaAppletsJava小程序,JavaappletAprogramthatisdesignedtobeembeddedintoanHTMLdocumentandtransferredovertheWebtosomeonewhowantstoruntheprogramJava小程序是为了嵌入HTML文档而设计的程序,能够通过Web传递给想运行它的用户。AnappletisembeddedintoanHTMLdocumentusingtheAPPLETtag,16-28,JavaAppletsJava小程序,Abrowserhasabuilt-ininterpreterthatexecutestheapplet,allowingtheusertointeractwithit.浏览器内置有能够执行小程序的解释器,使得应用能够与之进行交互。Howcanweexecuteaprogramthatwaswrittenononetypeofcomputeronpossiblymanyothertypesofcomputers?如何使在一种类型的计算机上编写的程序在多种类型的计算机上都能够运行呢?,16-29,JavaAppletsJava小程序,JavaprogramsarecompiledintoBytecode,alow-levelrepresentationofaprogramthatisnotthemachinecodeforanyparticulartypeofCPUJava程序将被编译成字节码这种低级表示法,而不是编译成只适合于特定机器的机器码。JavaappletsarerestrictedastowhattheycandoJava小程序被限制为只能做自己分内的事情TheJavalanguagehasacarefullyconstructedsecuritymodelJava语言具有仔细规划的安全模式Anapplet,forinstance,cannotaccessanylocalfilesorchangeanysystemsettingsJava小程序不能访问本地文件,也不能修改系统设置,16-30,JavaServerPagesJava服务器页,AJavaServerPage,orJSP,isawebpagethathasJSPscriptletsembeddedinthemJave服务器页是嵌入了JSP小脚本的Web页ScriptletAsmallpieceofexecutablecodeintertwinedamongregularHTMLcontentJSP小脚本:嵌在HTML文档中用于给Web页提供动态内容的代码片段,16-31,JavaServerPages,AJSPscriptletisencasedinspecialtagsbeginningwithJSP小脚本封装在特殊标记之间ImagineJSPscriptletsashavingtheexpressivepowerofafullprogramminglanguage可以认为JSP小脚本具有完整程序设计语言的强大功能,Page488,16-32,JavaServerPages,NotethatJSPsareexecutedontheserversidewherethewebpageresidesJSP是在Web页驻留的服务器上运行的Bythetimeitarrivesatyourcomputer,allactiveprocessinghastakenplace,producingastatic(thoughdynamicallycreated)webpage当Web页到达你的计算机时,所有的处理都已经完成,生成了(动态创建的)静态Web页JSPsareparticularlygoodforcoordinatingtheinteractionbetweenawebpageandanunderlyingdatabaseJSP尤其适合协调Web页和底层数据库之间的交互,16-33,XML,HTMLhasapredefinedsetoftagsandeachtaghasitsownmeaningThereisnothingaboutHTMLtagsthatdescribesthetruecontentofadocumentTheExtensibleMarkupLanguage,orXML,allowsthecreatorofadocumenttodescribeitscontentsbydefininghisorherownsetoftags,16-34,XML,MetalanguageAlanguagefortalkingabout,ordefining,otherlanguagesXMLisametalanguage,16-35,XML,LikeHTML,anXMLdocumentismadeupoftaggeddata,Figure16.5AnXLMLdocumentcontainingdataaboutbooks,16-36,XML,DocumentTypeDefinition(DTD)Aspec
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- XX企业数字化转型与智能生产设备质量控制2025年规划报告
- 住宅工程造价培训课件
- 阑尾手术创口护理
- 大众培训课件在哪看啊
- 快速康复护理路径
- 盆底康复:那近的远
- 量子陀螺仪在无人机导航中创新创业项目商业计划书
- 动物保健品电商平台创新创业项目商业计划书
- 农业自动化控制系统创新创业项目商业计划书
- 网站性能加速器创新创业项目商业计划书
- 2025中国人民抗日战争暨世界反法西斯战争胜利80周年课件PT
- 医德医风培训课件内容
- 挖孔桩孔内气体检测
- 《备课专业化》读书心得
- 《大学生创新创业基础》教案 第1课 大学生创新创业教育概论一
- CJ/T 120-2016给水涂塑复合钢管
- 盾构机施工工艺流程介绍
- 肌肉注射技术试题及答案
- 《界面设计》课件
- 腹腔镜胆囊切除术护理查房 课件
- 马工程西方经济学(精要本第三版)教案
评论
0/150
提交评论