求助:如何在以下页面里增加分页显示,比如一页显示1题。一题一题的做下去。
希望在学员姓名前面增加一个分页效果。Item=100 就是显示100题,但我希望一页显示一题,然后点下一页做第二题,再点下一页做第三题,至到第100题。交卷。页面如下:
<%@ language="vbscript"%>
<%response.Expires = 0%>
<!--#include file="conn.asp"-->
<!--#include file="inc/Function.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www. lang="zh-CN">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="360"><div align="center"> </div></td>
<td width="360"><div align="center"> </div></td>
<td width="360"><div align="center"> </div></td>
<td width="360"><div align="center"> </div></td>
</tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="360"> </td>
</tr>
</table>
<table width="980" border="0" align="center" cellpadding="5" cellspacing="0" class="table">
<tr>
<td bgcolor="FFF7D6" style="line-height:24px;color:#666666;"> </td>
</tr>
<tr>
<td style="line-height:24px;color:#666666;"><font color="#0000FF">以下从题库中随机抽取!</font></td>
</tr>
<tr>
<td valign="top" style="line-height:24px;color:#666666;"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form2" id="form2" method="post" action="jj.asp">
<%
session("tiku")=""
call rsname(rs,"select * from [taobaoti]",1,1)
Count=rs.RecordCount
Item=100
redim a(Item, 2),t(Count)
for each j in t
j=0
next
Randomize
for j=1 to Item
k=int(rnd*Count+1)
do while t(k)<>0
k=int(rnd*Item+1)
loop
t(k)=1
next
j=1:i=1
Do While Not rs.Eof
if t(j)=1 then
a(i,1)=rs("id")
a(i,2)=""
i=i+1
end if
j=j+1
rs.MoveNext
Loop
call closers()
for i=1 to Item
set rs=conn.execute("select * from [taobaoti] where id="&a(i,1)&"")
set temp=conn.execute("select top 4 * from [taobaoda] where tid="&a(i,1)&" order by mychar asc")
session("tiku")=session("tiku")&","&rs(0)
%>
<tr bgcolor="f5f5f5">
<td height="32" colspan="2"><strong style="font-size:14px;color:#111111;"> <%=i%>、<%=rs("question")%> </strong> <a href="shiti.asp?id=<%=rs(0)%>" target="_blank" style="color:red;font-weight:bold;">查询答案</a>
</td>
</tr>
<%do while not temp.eof%>
<tr>
<td width="4%" height="28"><div align="center">
<input type="radio" name="tid<%=rs(0)%>" value="<%=temp("mychar")%>" />
</div></td>
<td width="96%" style="font-size:14px;color:#222222;font-family:georgia;"><%=temp("mychar")%> <%=temp("answer")%></td>
</tr>
<%
temp.movenext
loop
temp.close
set temp=nothing%>
<tr>
<td colspan="2"><hr></td>
</tr>
<%
next
call closers()
%>
<tr>
<td height="40" colspan="2">学员姓名:
<input name="myname" type="text" id="myname" size="10" maxlength="10" /> </td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Submit2" value="交卷" style="font-size:14px;width:90px;height:30px;" /></td>
</tr>
</form>
</table></td>
</tr>
</table>
</body>
</html>