asp分页代码,在第一页无法跳转下一页,但在第二页之后都可以,为什么?烦请大侠告知下,谢谢~!
sub pagefy(page,zys,url) ''page 当前页 zys 总页数 url 当前页urlif 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