书签 分享 收藏 举报 版权申诉 / 27

类型WEB个人主页课程设计.docx

  • 文档编号:25507515
  • 上传时间:2023-06-09
  • 格式:DOCX
  • 页数:27
  • 大小:631.83KB

--headerend-->

--nav-->

  • 首页
  • 通讯录 
  • 留言板

--navend-->

--contentstart-->

--left-->

--wz-->

24px;color:

#B71E1E;">心情:

藏起来的目的就是为了被找到。

#B71E1E;font-size:

24px;">心情:

待人友善是修养,独来独往是性格。

#B71E1E">心情:

何以致契阔,绕腕双跳脱。

 

--leftend-->

--right-->

姓名:

薛皓

班级:

2015级计科一班

学号:

201513030112

--contentend-->

--footerstart-->

Designby:

15级计科一班薛皓201513030112

--footerend-->

jQuery(".lanmubox").slide({easing:

"easeOutBounce",delayTime:

400});

(二)、留言板

1、我的留言板

点击留言板标后直接进入留言板详细页面,从而看见很多朋友在此留言来吸引游客的好奇心,此页面主要应用以下知识点:

1)Session、application。

2)数据库连接

主要代码:

以下为数据库连接建立一个Connection对象实例db代码

留言:

<%

setconn=server.createobject("adodb.connection")

connstr="Provider=Microsoft.jet.oledb.4.0;datasource="&server.mappath("db1.mdb")

conn.openconnstr

%>

<%

Dimsql,bh,xm,ly,rq

Setrs=Server.CreateObject("ADODB.Recordset")

sql="selectbh,xm,ly,rqfromlyb"

rs.Opensql,conn,1,3

rs.AddNew

%>

Connection对象与数据库建立连接,并对数据库执行添加、删除、等相关操作。

AddNew是添加操作。

当表单内容通过post方法提交时,asp的request对象的form方法可以取得提交数据并进行相应的操作。

如留言板中的添加操作:

提交数据:

<%

高级编辑器

在这里输入你的信息

%>

接受数据:

<%

Dimsql,bh,xm,ly,rq

Setrs=Server.CreateObject("ADODB.Recordset")

sql="selectbh,xm,ly,rqfromlyb"

rs.Opensql,conn,1,3

rs.AddNew

bh=Request.Form("bh")

xm=Request.Form("xm")

ly=Request.Form("ly")

rs("xm")=xm

rs("ly")=ly

rs.Update

rs.Close

Setrs=Nothing

conn.Close

SetConn=Nothing

%>

 

2、我的留言界面

此界面为静态页,主要应用而文本框、多行文本框等知识点,将Method的属性设置为POST。

主要代码:

DOCTYPEHTML>

留言板-个人空间

--[ifltIE9]>

[endif]-->

--headerstart-->

个人空间

念念不忘,必有回响。

--headerend-->

--nav-->

--navend-->

--contentstart-->

--left-->

当前位置:

留言板

姓名

内容

时间

提交新留言

姓名

留言内容

时间

 

 

 

--endleft-->

--right-->

姓名:

薛皓

班级:

2015级计科一班

学号:

201513030112

">

--栏目分类-->

--end-->

--endright-->

--contentend-->

--footer-->

Designby:

15计科一班薛皓201513030112

--footerend-->

jQuery(".lanmubox").slide({easing:

"easeOutBounce",delayTime:

400});

(三)、通讯录

1、我的通讯录

主要代码:

1)数据库的连接

2)循环的输出。

<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Default6.aspx.cs"Inherits="Default6"%>

DOCTYPEhtml>

//www.w3.org/1999/xhtml">

.auto-style1{

text-align:

right;

font-weight:

bold;

font-size:

larger;

}

.auto-style4{

border-style:

outset;

}

url(image/back.png);background-size:

cover;">

GridViewID="GridView1"runat="server"AllowPaging="True"AutoGenerateColumns="False"BackColor="White"BorderColor="White"BorderStyle="Ridge"BorderWidth="2px"CellPadding="3"CellSpacing="1"DataSourceID="SqlDataSource1"GridLines="None"Height="410px"Width="100%"style="text-align:

center">

BoundFieldDataField="姓名"HeaderText="姓名"SortExpression="姓名"/>

BoundFieldDataField="性别"HeaderText="性别"SortExpression="性别"/>

BoundFieldDataField="电话"HeaderText="电话"SortExpression="电话"/>

BoundFieldDataField="邮箱"HeaderText="邮箱"SortExpression="邮箱"/>

CommandFieldShowDeleteButton="True"/>

GridView>

SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ConnectionStrings:

WANGJConnectionString%>"SelectCommand="SELECT*FROM[Table_1]">

SqlDataSource>

2、添加新记录

主要代码:

<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Default4.aspx.cs"Inherits="Default4"%>

DOCTYPEhtml>

添加

.title{

text-align:

center;

font-family:

'MicrosoftYaHei';

font-size:

50px;

padding:

60px000;

color:

#ccc;

}

body{

background-image:

url(image/back.png);background-size:

cover;

}

.auto-style1{

width:

969px;

border:

5pxsolid#00FF00;

}

.auto-style6{

border:

1pxsolid#008000;

width:

182px;

height:

150px;

font-weight:

bold;

font-size:

larger;

}

.auto-style7{

border-style:

solid;

border-color:

#008000;

width:

618px;

height:

150px;

}

.textbox{

margin-left:

5px;

}

.bottom{

margin-left:

400px;

margin-top:

10px;

}

.sex1{

margin-left:

10px;

}

.sex{

margin-left:

20px;

}

.auto-style9{

border:

1pxsolid#008000;

width:

182px;

height:

50px;

font-weight:

bold;

font-size:

larger;

}

.auto-style10{

color:

#A0A0A0;

}

.auto-style11{

text-decoration:

none;

}

.auto-style12{

color:

#000000;

font-size:

larger;

font-weight:

bold;

}

.auto-style13{

font-size:

larger;

color:

#CCCCCC;

padding:

000180px;

}

.auto-style14{

font-size:

larger;

color:

#000000;

padding:

000180px;

font-weight:

bold;

}

.auto-style15{

margin-left:

5px;

}

.auto-style16{}

.auto-style17{

border-style:

solid;

border-color:

#008000;

width:

618px;

height:

50px;

}

LabelID="Label1"runat="server"Text="添加新成员"style="color:

#000000;f

举报
举报
版权申诉
版权申诉
word格式文档无特别注明外均可编辑修改;预览文档经过压缩,下载后原文更清晰! 立即下载
配套讲稿:

如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

特殊限制:

部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

关 键  词:
WEB 个人主页 课程设计
提示  冰豆网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:WEB个人主页课程设计.docx
链接地址:https://www.bdocx.com/doc/25507515.html
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2008-2022 冰点文档网站版权所有

经营许可证编号:鄂ICP备2022015515号-1

收起
展开