#middle1{width:740px;height:800px;background:#666666;margin:10px; float:left; border:1px groove #00CC33; cursor: crosshair; float:left;}
#middle1 table{ margin:2px 5px 5px 5px; cursor: wait;} #middle1 table a:hover{color:#333333;}
#middle2{width:230px;height:600px;float:right;cursor:move; margin:0px;}
#middle2 img{ border: 1px groove #00CC33; margin:5px;} #middle3{ width:500px; height:680px; float:left;}
#middle4{width:740px;height:600px;background:#666666;margin:10px; float:left; border:1px groove #00CC33; cursor: crosshair; float:left;}
#middle4 table{ margin:2px 5px 5px 5px; cursor: wait;} #middle4 table a:hover{color:#333333;}
#middle4 img{ border:2px double #333333; border-bottom-width:10px; border-right-width:10px;border-left-width:10px;border-top-width:10px}
#middle5{ width:735px; height:700px; float:left;} #middle5 img a:hover{ width:100px; height:90px;}
#right{ width:170px; background:#666666; float:right; height:500px; margin:0px; border:1px groove #FF9900; height:700px;}
#right img{ margin:5px;}
a:link{ color:#FF9966; text-decoration:none;} a:visited{ color:#FF9999; text-decoration:none;} a:hover{ color:#FF6600; font-size:18px;} [11] 2、数据库连接代码页面 conn.asp <%
set conn=Server.CreateObject(\
connstr=\icrosoft Access Driver (*.mdb)};\conn.open connstr %>
17
3、分页功能模块代码 <%
Set rs = Server.CreateObject(\ Page = CLng(Request(\
sql = \ rs.open sql, conn, 3, 2 rs.PageSize = 1
'每页显示记录数
If Page < 1 then Page = 1
If page > rs.PageCount Then Page = rs.PageCount '指定页数 > 实际页数的处理
If rs.PageCount > 0 then rs.AbsolutePage = Page '页数 > 0 的处理 %> <%
If rs.PageCount > 1 then %>
<%
For i = 1 to rs.PageCount If i = Page then color = \
response.write \ Else color = \ response.write \ Cstr((i))+ \color=\color + \+ Cstr(i)+ \ 18 End If Next %> ElseIf rs.PageCount < 1 then response.Write \align=‘center’> 无 相关数据!!...
End If %>
4、添加记录操作 <%
Set Rs = Server.CreateObject(\Sql = \Rs.Open Sql,conn,1,3 Rs.AddNew
rs(\rs(\rs(\rs(\rs(\rs(\Rs.Update Rs.Close Set Rs=Nothing conn.close set conn=nothing
response.Write(\您好,您所留言的信息已成功提交,正在转入留言页面');location.href='ly.asp';\
19
%>
5、删除记录操作 <%
id=request.querystring(\定义传值参数 %> <%
set rs=Server.CreateObject(\sql = \rs.open sql,conn,3,2 if not rs.eof then rs.delete
response.Write(\
删
除
');location.href='liuyyan.asp';\end if %>
6、记录的修改和查看 <%
Set rs = Server.CreateObject(\Sql = \rs.open sql,conn,1,3
rs(\rs(\rs(\rs(\rs(\rs(\rs(\rs(\rs(\
20
成
功
!
相关推荐: