[求助]在做分页显示时,提示一个值是无效字符???
<!--#include file="../include/conn.asp"--><% '查询判断题库中符合条件的数据
sql="select * from tiku_wrongright where question like '%"&keyword&"%' order by wrongright_ID desc"
rs.open sql,coon,3,1,1 '打开判断题库
rs.pagesize = 10 '指定页面的最大记录数为10
%>
<% '创建表格循环插入数据记录,且按照单双数表格分色显示
if not(rs.eof and rs.bof) then
page = cint(request.QueryString("page"))
if page < 1 then page = 1
if page > rs.pagecount then page = rs.pagecount
showpages rs,page
%>
<% else%>
<tr><td colspan=5><center><font color=red>没有你查的试题信息</font></center></td></tr>
<% else if %>
<%
sub showpages(rs,page)
rs.Absolutepage = page
for i=1 to rs.pagesize-1 'sql语句的循环语句
j=j+1
'如果行数能被2整除,则背景颜色为"#EFEFF7",否则为"#ffffff"
if j mod 2 =0 then
bg="#EFEFF7"
else
bg="#ffffff"
end if
%>
<tr bgcolor=<%=bg%>>
<td align="center"><%=rs("wrongright_ID")%></td>
<td><%=rs("question")%></td>
<td align="center">
<% if rs("right_answer")=ture then
d="对"
else
d="错"
end if
response.write d
%></td>
<td align="center"><a href="tiku_wrongright_edit.asp?id=<%=rs("wrongright_ID")%>">编辑</a></td>
<td align="center"><a href="tiku_wrongright_del.asp?id=<%=rs("wrongright_ID")%>">删除</a></td>
</tr>
<%
rs.movenext '指针移到下一个记录
if rs.eof then exit for '如果记录结束,则退出for循环
next%>
<%end sub%>
<tr>
<td colspan="5" align="center">
<p align="center"><form action=tiku_wrongright.asp?keyword=<%=keyword%> method="get" name=form1></form></p></td>
</tr>
<script language="vbscript" runat="server">
response.Write rs.pagesize&"跳一页 "
if page=1 then
response.write"第一页"
end if
if page<> 1 then
response.Write"<a href=tiku_wrongright.asp?keyword="&keyword&"&page=1>第一页</a>"
response.Write"<a href=tiku_wrongright.asp?keyword="&keyword&"&page=" &(page+1) &">上一页</a>"
end if
if page <> rs.pagecount then
response.Write"<a href=tiku_wrongright.asp?keyword="&keyword&"&page=" & (page+1)&">下一页</a>"
response.Write"<a href=tiku_wrongright.asp?keyword="&keyword&"&page=" & rs.pagecount &">最后一页</a>"
end if
if page=rs.pagecount then
response.Write"最后一页"
end if
response.Write"总共有"&rs.pagecount&"页, 目前是第"&page&"页"
%>
转到<font class="a">
<input maxlength="8" size="4" name="page" value=<%=page%>>
<input type="hidden" value=<%=keyword%> name="keyword">
页<span lang="en-us"></span>
<input class="buttonface" type="button" value="GOto" onClick=check() style="width:60;height:22;
border-style:solid; border-width:1px; background-color:#FFFFFF"></font><br>
</script>
其中:
<% '查询判断题库中符合条件的数据
sql="select * from tiku_wrongright where question like '%"&keyword&"%' order by wrongright_ID desc"
rs.open sql,coon,3,1,1 '打开判断题库
rs.pagesize = 10 '指定页面的最大记录数为10
%>
调试时给出提示为:
错误类型:
Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/onlineexam/admin/tiku_wrongright.asp, line 56, column 16
rs.pagesize = 10
---------------^
麻烦解释一下
谢谢了