回复 6楼 yms123
版主,不好意思,因为课业紧张,现在才有时间上网。
代码贴出来你看看怎么回事:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>英语</title>
</head>
<style type="text/css">
<!--
td{font: 10pt/12pt "Arial"; color: black}
-->
</style>
<body>
<font size=4 color=red><center>请根据所给中文写出英文单词</center></font>
<table align=center>
<tr>
<td>
</td>
</tr>
</table>
<%clas=request.form("jibie")
'"jibie"是从前台传过来的所选的英语级别的表名。
Set conn= Server.CreateObject("ADODB.Connection")
provider="provider=microsoft.jet.oledb.4.0;"
DBPath ="data source=" & Server.MapPath("data.mdb")
conn.Open provider & DBPath
set rs=server.createobject("adodb.recordset")
SQL="select * from "&clas
’这里使用session()变量也不管用,点击“下一页”后,可以检测发现原本有值的“clas”变量变成空了。
pgsize=1
page=request.querystring("page")
rs.open SQL,conn,1,1
rs.pagesize=pgsize
pgnm=rs.pagecount
if page="" or clng(page)<1 then page=1
if clng(page)>pgnm then page=pgnm
if pgnm>0 then rs.absolutepage=page
count=0
%>
<%session("chinese")=rs("chinese1")%>
<%session("english")=rs("english")%>
<table width="788" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#3399CC">
<tr>
<td width="368" height="36" align="left"><font size="3">中文意思</font></td>
<td width="414" height="36" align="left"><font size="3">请输入英文</font></td>
</tr>
<% do while not rs.eof and count<rs.pagesize %>
<tr><td size=4 height="25"width=368 align=left><%Response.Write rs("chinese1")%><%=rs("chinese2")%></td>
<td height="25"width=414 align=left>
<form action ="result.asp" name=getinf method=post>
<input type=text name=english
size=58 ></td>
</tr>
<% count=count+1
rs.MoveNext
Loop
rs.Close
Set rs=Nothing
conn.Close
Set conn=Nothing
%>
<%session("page")=page%>
<table width="1236" align=center>
<tr><td width="281"><font size="3">
</font><a href=deal.asp?page=1><font size="3">第一题</font></a></td>
<td width="178"><font size="3"> <a href=deal.asp?page=<%=page-1%>>上一题</a></font></td>
<td><font size="3"> <a href=deal.asp?page=<%=page+1%>>下一题</a></font></td>
<td width="575"><font size="3"> <a href=deal.asp?page=<%=pgnm%>>最后一题</a></font></td>
</tr></table>
<br>共有<%=pgnm%>题;当前在第<%=page%>题
</html>
</table>
</body>
<center><br><input type=submit name=submit1 value="确定"></form>
<p align="center"><a href="tongji.asp">不做了,看成绩去!</a></p>
请版主帮忙解决一下这个问题,谢谢!