dim MaxPerPage
MaxPerPage=20
'假如没有数据时
If rs.eof and rs.bof then
call showpages
response.write "<p align='center'><font color='#ff0000'>还没任何商品资料</font></p>"
response.end
End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
3、判断跳转页面是否正确
判断跳转页面是否正确,如果正确则显示相应记录,不正确则显示当前页面。代码如下:
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call showpages
call list
If Rs.recordcount > MaxPerPage then
call showpages
end if
4、显示记录的过程list
创建显示记录的过程list,循环显示图书借阅信息。代码如下:
Sub list()%>
创建表单,实现借阅图书信息检索。代码如下:
<form method='POST' action='Old_Search.asp'>
<TABLE cellSpacing=1 cellPadding=4 width=100% bgColor=#416327 height="136">
<TBODY>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main1 height="10" bgcolor="#1f60a0" background="images/bg.gif"></TD></TR>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main1 height="18">借阅图书历史信息-- <input type="button" value="当前借阅信息" onclick=" window.location='default.asp'" style="font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMo毕业论文http://www.751com.cn/useOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#D4D0C8'">
借阅图书历史信息检索: <select name='Class' size='1' tabindex='0' style="font-size: 9pt">
<option value='按图书名称'>按图书名称</option>
<option value='按借阅人'>按借阅人</option>
<option value='按借阅种类'>按借阅种类</option>
<option value='按借阅数量'>按借阅数量</option>
<option value='按过期天数'>按过期天数</option>
</select>
<input type='text' name='Name' size='11' onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" style="font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:18px;background-color:#f3f3f3;border:1 solid black">
<input type='submit' value='查询' name='Submit' style="font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#D4D0C8'">
</TD></TR>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main1 height="15">
<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#1f60a0" bordercolordark="#e1f0ff" height="49">
<tr class=main1>
<td width="6%" bgcolor="#1f60a0" align="center" height="22"><font color="#FFFFFF">序号</font></td>
<td width="17%" bgcolor="#1f60a0" align="center" height="22"><font color="#FFFFFF">借阅图书名称</font></td>
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页