实验二ASP网站开发基础课后题

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

实验二ASP.NET4.5网站开发基础一、实验名称:ASP.NET4.5网站开发基础二、实验内容:1.建立一个描述MyPetShop网站信息的XHML5文件!DOCTYPEhtmlhtmlxmlns==Content-Typecontent=text/html;charset=utf-8/metaname=keywordscontent=MyPetShop,XHTML5/title/titlestyletype=text/cssaside{float:left;width:15%;}section{float:right;width:85%;}footer{clear:both;}/style/headbodyheaderimgalt=MyPetShopsrc=F:/web程序设计/Experiment1/Experiment1/2013.gif//headerasidenavstyle=background-color:#C0C0C0ahref=HTML5.html介绍/abr/ahref=HTML5.html数据库设计/a/nav/asidesectionh3MyPetShop/h3articleMyPetShop是本书提供的一个综合实例,用来展示ASP.NET4.5网络开发技术。/articlearticleh4MyPetShop/h4MyPetShop包括前台商品浏览、用户管理、购物车、订单结算和后台管理等模块。/article/sectionfooterstyle=background-color:#C0C0C0Copyright2014MyPetShop/footer/body/html2.利用table实现页面布局%@PageLanguage=C#AutoEventWireup=trueCodeFile=TableLayout.aspx.csInherits=TableLayout%!DOCTYPEhtmlhtmlxmlns==servermetahttp-equiv=Content-Typecontent=text/html;charset=utf-8/title/titlestyletype=text/css.auto-style1{width:100%;}/style/headbodyformid=form1runat=serverdivtableclass=width:100%trtdrowspan=2asp:ImageID=ImgLogorunat=serverImageUrl=~/2013.gifWidth=160px//tdtdsthle=text-align:center;background-color:#99CCFFasp:LinkButtonID=lnkbtnDefaultrunat=server首页/asp:LinkButton/tdtdsthle=text-align:center;background-color:#99CCFFasp:LinkButtonID=lnkbtnResetrunat=server个性重置/asp:LinkButton/tdtdsthle=text-align:center;background-color:#99CCFFasp:LinkButtonID=lnkbtnRegisterrunat=server注册/asp:LinkButton/td/trtrtdcolspan=3style=background-color:#CCFFFF登录状态/td/trtrtdcolspan=4style=background-color:#33CCCC您的位置:/td/tr/table/div/form/body/html3.利用div实现页面布局%@PageLanguage=C#AutoEventWireup=trueCodeFile=DivLayout.aspx.csInherits=DivLayout%!DOCTYPEhtmlhtmlxmlns==servermetahttp-equiv=Content-Typecontent=text/html;charset=utf-8/title/title/headbodyformid=form1runat=serverdivid=topdivid=logo_navi_statdivid=logostyle=float:left;width:30%asp:ImageID=imgLogorunat=serverImageUrl=~/Images/logo.gif//divdivid=navigationstyle=background-color:#99CCFF;height:30px;asp:LinkButtonID=lnkbtnDefaultrunat=server首页/asp:LinkButton    | asp:LinkButtonID=lnkbtnResetrunat=server个性重置/asp:LinkButton    | asp:LinkButtonID=lnkbtnRegisterrunat=server注册/asp:LinkButton/divdivid=statusstyle=background-color:#CCFFFF;height:30px;登陆状态/div/divdivid=positionstyle=background-color:#33CCCC您的位置:/div/div/form/body/html4.建立独立的.css文件(1)设置样式table{width:100%;}.navigation{text-align:center;background-color:#99CCFF;}.status{background-color:#CCFFFF;}.position{background-color:#33CCCC;}#logo{float:left;width:30%;}#navigation{background-color:#99CCFF;height:30px;}#status{background-color:#CCFFFF;height:30px;}#navigation{background-color:#99CCFF;height:30px;}#position{background-color:#33CCCC;}(2)将样式应用于表格布局%@PageLanguage=C#AutoEventWireup=trueCodeFile=TableCSS.aspx.csInherits=TableCSS%!DOCTYPEhtmlhtmlxmlns==servermetahttp-equiv=Content-Typecontent=text/html;charset=utf-8/title/titlelinkhref=Styles/TableDiv.cssrel=stylesheettype=text/css/styletype=text/css.auto-style2{width:427px;}.auto-style4{text-align:center;background-color:#99CCFF;height:61px;}.auto-style7{background-color:#CCFFFF;height:29px;}/style/headbodyformid=form1runat=serverdivtableclass=width:100%trtdrowspan=2class=auto-style2asp:ImageID=ImgLogorunat=serverImageUrl=~/2013.gifWidth=160px//tdtdclass=auto-style4asp:LinkButtonID=lnkbtnDefaultrunat=server首页/asp:LinkButton/tdtdclass=navigationasp:LinkButtonID=lnkbtnResetrunat=server个性重置/asp:LinkButton/tdtdclass=navigationasp:LinkButtonID=lnkbtnRegisterrunat=server注册/asp:LinkButton/td/trtrtdcolspan=3class=auto-style7登录状态/td/trtrtdcolspan=4class=position您的位置:/td/tr/table/div/form/body/html(3)将样式用于div布局%@PageLanguage=C#AutoEventWireup=trueCodeFile=DivCss.aspx.csInherits=DivCss%!DOCTYPEhtmlhtmlxmlns==servermetahttp-equiv=Content-Typecontent=text/html;charset=utf-8/title结合div层和.css文件进行页面布局/titlelinkhref=Styles/TableDiv.cssrel=stylesheettype=text/css//headbodyformid=form1runat=serverdivid=topdivid=logo_navi_statdivid=logoasp:ImageID=imgLogorunat=serverImageUrl=~/Images/logo.gif//divdivid=navigationasp:LinkButtonID=lnkbtnDefaultrunat=server首页/asp:LinkButton    | asp:LinkButtonID=lnkbtnResetrunat=server个性重置/asp:LinkButton    | asp:LinkButtonID=lnkbtnRegisterrunat=server注册/asp:LinkButton/divdivid=status登陆状态/div/divdivid=position您的位置:/div/div/form/body/html5.利用JavaScript关闭当前窗口htmlxmlns=

1 / 9
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功