标题:关于地址栏参数
取消只看楼主
tianshu
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2008-5-1
 问题点数:0 回复次数:0 
关于地址栏参数
我有一段代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<!-- #include file="config/db.asp" -->
<%
if request.QueryString("page")="" then
    page=1
else
    page=request.QueryString("page")
end if
pagelistnum=2
set rst=server.CreateObject("ADODB.recordset")
sql="select count(*) as num from tbl_user"
rst.open sql,conn,1,1
znum=rst("num")
zpage=znum\pagelistnum
if znum mod pagelistnum<>0 then zpage=zpage+1
if page<zpage then
    response.Write page & "<br>"
    response.Write zpage & "<br>"
    response.Write "aaa"
else
     response.Write page & "<br>"
    response.Write zpage & "<br>"
    response.Write "bbb"
end if
set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>
我的zpage=5,但只要加了地址栏参数,如test.asp?page=1,page<zpage的判断就不成立,输出:


bbb
这是什么原因啊?
搜索更多相关主题的帖子: 地址 head page 参数 
2008-05-11 10:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-213667-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.402809 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved