高手帮忙?谢谢!
<!-- #include file="Include/Chk.asp" --><!-- #include file="Conn.asp" -->
<%
dim name,sid
name=Trim(Request.Form("name"))
sid=Trim(Request.Form("sid"))
cate=Request.Form("cate")
if sid="" or name="" or cate="" then
Response.Write "<script language='javascript'>alert('请填写完所有项目!');history.go(-1);</script>"
Response.End()
end if
set rs=server.createobject("Adodb.Recordset")
sql="Select * from Staff "
rs.open sql,conn,1,3
bid=rs("bid")
name=rs("name")
sid=rs("sid")
cate=rs("cate")
dep=rs("dep")
source=rs("source")
bs=rs("bs")
sj=rs("sj")
cname=rs("cname")
pingzhong=rs("pingzhong")
fhtime=rs("fhtime")
rs.update
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>查询结果</title>
<link href="Images/default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
.STYLE2 {
font-size: 36px;
font-weight: bold;
}
.STYLE3 {
color: #FF0000;
font-weight: bold;
}
.STYLE4 {color: #FF0000}
.STYLE5 {color: #000000}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<table width="259" border="0">
<tr>
<td width="84"><img src="Images/l20071016131943.jpg" width="84" height="61" /></td>
<td width="165"><span class="STYLE2">查询结果</span></td>
</tr>
</table>
<table width="842" height="57" border="1">
<tr>
<td align="center">公司编号</td>
<td align="center"><span class="STYLE5">公司名称</span></td>
<td align="center"><span class="STYLE1 STYLE5">发贷时间</span></td>
<td align="center"><span class="STYLE1 STYLE5">发片时间</span></td>
<td align="center"><span class="STYLE1 STYLE5">是否发贷</span></td>
<td align="center"><span class="STYLE1 STYLE5">快递公司</span></td>
<td align="center">查贷电话</td>
<td align="center">查看详细</td>
</tr>
<%set rs=server.createobject("adodb.recordset")
sql="Select * from Staff where name='"&name&"' and sid='"&sid&"' and cate="&cate
rs.open sql,conn,1,3
if rs.eof then
response.write "没有记录!"
end if
rs.pagesize = 2
if request("page")="" or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if
i=1
do while not rs.eof and i<=rs.pagesize
%>
<tr>
<td align="center"><%=rs("sid")%></td>
<td align="center"><%=rs("name")%></td>
<td align="center"><%=rs("fhtime")%></td>
<td align="center"><%=rs("source")%></td>
<td align="center"><span class="STYLE3"><%=rs("dep")%></span></td>
<td align="center"><%=rs("cname")%></td>
<td align="center"><%=rs("bs")%></td>
<td align="center"><a href="Staff_View.asp?id=<%=Trim(rs("id"))%>">查看</a></td>
</tr>
<%
i=i+1
rs.MoveNext
loop
%>
<tr>
<td colspan="8" align="center">分页:
<%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
p=(page-1) \ 10
else
p=(page-1) \ 10
end if
response.write "页次:"& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
" 分页:"
if p*10>0 then response.write "<a href='?keywords="&keywords&"&keywords2="&keywords2&"&xs="&xs&"&page="&p*10&"' title=上十页>[<<]</a> "
uming_i=1
for ii=p*10+1 to P*10+10
if ii=page then
response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
else
response.write "<a href='?keywords="&keywords&"&keywords2="&keywords2&"&xs="&xs&"&page="&ii&"'>["+Cstr(ii)+"]</a> "
end if
if ii=rs.pagecount then exit for
uming_i=uming_i+1
next
if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?keywords="&keywords&"&keywords2="&keywords2&"&xs="&xs&"&page="&ii&"' title=下十页>[>>]</a> "
response.write(" 跳页:<input type=text name=page size=2 maxlength=3 class=wenbenkuang> <input type=submit name=Submit value=Go class=go-wenbenkuang>")
end if
%> </td>
</tr>
</table>
<p> </p>
<p> 杭州摩格科技有限公司</p>
</div>
</form>
</body>
</html>
为什么我点击第二页的时候,并没有跳转到第二页,而是执行“if sid="" or name="" or cate="" then
Response.Write "<script language='javascript'>alert('请填写完所有项目!');history.go(-1);</script>"
Response.End()
end if
”这段代码了,出现了一个提示框,应该怎么解决啊?