标题:asp分页代码,在第一页无法跳转下一页,但在第二页之后都可以,为什么?烦请 ...
只看楼主
zz168
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2010-3-17
结帖率:100%
 问题点数:0 回复次数:1 
asp分页代码,在第一页无法跳转下一页,但在第二页之后都可以,为什么?烦请大侠告知下,谢谢~!
sub pagefy(page,zys,url) ''page 当前页 zys 总页数 url 当前页url
    if instr(url,"?") > 0 then
        tj = url + "&"
    else
        tj = url + "?"
    end if
    if page > zys then page = zys
    if page = 1 then
        sypage = 1
        xypage = 1
    else
        sypage = page - 1
        xypage = page + 1
    end if
    response.write ""
    response.write " 第"+cstr(page)+"/"+cstr(zys)+"页"
    response.write " 首页"
    response.write " 上一页 "
    response.write " 下一页"
    response.write " 未页"
    response.write " 页码"
    response.write ""
    response.write " "+""
    response.write " 跳转 "
end sub

sub back(dz,z)
    if dz = "gb" then Response.Write("close();")
    if dz = "xx" then Response.Write("alert("""&z&""");")
    if dz = "xxgb" then Response.Write("alert("""&z&""");close();")
    if dz = "xs" then Response.Write("alert("""&z&""");window.opener.location.reload();")
    if dz = "fh" then Response.Write("history.go(-1)"";")
    if dz = "xxfh" then    Response.Write("alert("""&z&""");window.opener.location.reload();history.go(-1);")
end sub
''结束

function sjk_xs(tb,xs,tj)
    if tj <> "" then tj = " and " & tj
    exec="select * from " & tb & " where 1=1 " & tj
    set rsc = server.createobject("adodb.recordset")
    rsc.open exec,conn,3,3
    if not rsc.eof then
        xs = rsc(xs)
    else
        xs = ""
    end if
    sjk_xs = xs
end function
搜索更多相关主题的帖子: asp 
2012-12-16 15:40
zz168
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2010-3-17
得分:0 
我知道了,if page = 1 then
        sypage = 1
        xypage = page + 1

这个看错了。。
2012-12-16 16:01



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




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

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