这是一个简单的测试分页的程序,代码如下:
![]()
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
![]()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
![]()
<html>
![]()
<head>
![]()
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
![]()
<title>测试分页</title>
![]()
</head>
![]()
![]()
<body>
![]()
<%
![]()
dim all, cnt, page, dig
![]()
dig = 10 ' 每页显示条目
![]()
all = 100 ' 总共的显示条目
![]()
cnt = 1
![]()
page = Request.QueryString("page")
![]()
pagenum = all/dig
![]()
Response.Write("pagenum = "&pagenum&"<br>page = "&page&"<br>")
![]()
%><hr>
![]()
<%
![]()
cnt = 1
![]()
do until cnt > all
![]()
if cnt>(page-1)*dig and cnt<=page*dig then
![]()