⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cjcxcjcx.asp

📁 本人大二数据库实习作品
💻 ASP
字号:
<html>

<head>
<title></title>
<style type=text/css>
td {font-size: 15px;line-height: 140%;color:#004F27}
</STYLE>
</head>

<body background="bg.gif" bgproperties="fixed">
<font color="green"><h1 align="center"><font face="幼圆">0203206学生成绩查询</font></h1></font>
<form method="POST" action="gjcjcx.asp">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;输入姓名进行查询:&nbsp;<input type=text name="tiaojian">
<input type=submit value="确定"> 
<input type=reset vallue="重填"> 
</form>
<%
dim cn,rs
dim ipage
set cn=Server.CreateObject("ADODB.Connection")
cn.open="Driver={SQL SERVER};Server=SUNZY;Database=xuexi;UID=sa;PWD=;"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "select * from 成绩",cn,1,1
rs.Pagesize=10
If Len(Request("page"))=0 Then
ipage=1
Else
ipage=Request("page")
End if
rs.Absolutepage=ipage
%>
<p align=center>共有<%=rs.recordcount%>个学生</p>
<p align="center">学生信息第<%=ipage%>页</p>
<table border=1 align="center">
<tr>
<td width=100 align=center>姓名</td>
<td width=100 align=center>操作系统</td>
<td width=80 align=center>数据库技术</td>
<td width=100 align=center>计算机组成</td>
<td width=200 align=center>计算机网络</td>
<td width=100 align=center>JAVA</td>
<td width=100 align=center>数据库原理</td>
</tr>
<%
For i=1 to rs.pagesize
if not rs.eof then
%><tr>
<td width=100 align=center><%=rs(0) %></td>
<td width=100 align=center><%=rs(1) %></td>
<td width=80 align=center><%=rs(2) %></td>
<td width=100 align=center><%=rs(3)%></td>
<td width=200 align=center><%=rs(4)%></td>
<td width=100 align=center><%=rs(5)%></td>
<td width=100 align=center><%=rs(6)%></td>
</tr>
<% end if
If not rs.Eof Then rs.MoveNext
next
%>
</table>
<p align="center">
<%
If CInt(ipage)=1 Then
%>
第一页 |上一页|
<%
else
%>
<a href="cjcxcjcx.asp?page=1">第一页</a>
<a href="cjcxcjcx.asp?page=<%=ipage-1%>">上一页</a>|
<%
end if
%>
<%
if CInt(ipage)=CInt(rs.pagecount) Then
%>
下一页| 最后一页
<%
Else
%>
<a href="cjcxcjcx.asp?page=<%=ipage+1%>">下一页</a>|
<a href="cjcxcjcx.asp?page=<%=rs.pagecount%>">最后一页</a>
<%
end if
%>
<%
rs.close
set rs=nothing
cn.close
set cn=nothing
%>
<hr width=60% color=green>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -