请高手排错?

xh2dxm 2005-04-19 03:28:52
有如下代码运行后,在单行输入框中输入页码,点击回车后,跳转到其它页面时,没有结果显示。
代码如下:

<%
dim conn
set conn=server.createobject("adodb.connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("..\mdb\zixun.mdb")
%>
<html>
<head>
<SCRIPT language=JavaScript type=text/JavaScript>
function aaa(){
document.forms[0].text=<%=kwname%>&<%=kwclass%>
document.forms[0].submit()
}
</SCRIPT>
</head>

<body bgcolor="#E8E8E8" background="1JI-tp/small/BJgif.gif" text="#003333" link="#003399" vlink="#006699">
<div align="center">
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="22%" align="left" valign="top" class="shuxian-you">
<table width="100%" height="" border="0" cellpadding="0" cellspacing="0">

<tr>
<td align="center" valign="top"><!-- #include file="aa.asp" --> </td>
</tr>
</table>

</td>
<td width="78%" align="left" valign="top">
<%if not isempty(request("kwclass")) then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">


<tr>
<td height="102">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="wz-neirong">
<div align="center"><img src="1JI-tp/tt-zhanwei.gif" width="8" height="5">
</div></td>
</tr>
<tr>


<tr>
<td height="102" align="left" valign="top">
<table width="77%" height="150" border="0" align="center" cellpadding="1" cellspacing="3" class="wz-news">

<%
kwname=request("kwname")
kwclass=request("kwclass")
set rs=server.createobject("adodb.recordset")
rs.open "select * from news where type='电子刊物' and kwname='"&kwname&"' and kwclass='"&kwclass&"' ",conn,1,1
page = request("page")
if page = "" or IsNull(page) then page = 1
if not IsNumeric(page) then page = 1
page = Cint(page)
recordcount = RS.RecordCount
pagesize=10
RS.PageSize = pagesize
pagecount = RS.PageCount
if page < 1 then
page = 1
elseif page > pagecount then
page = pagecount
end if
if recordcount > 0 then RS.AbsolutePage = page
for i=1 to pagesize
if rs.eof then exit for
id=Cint(trim(rs.fields("id")))
title=replace(trim(rs.fields("title")),"<br>",chr(13))
title1=left(title,32)
%>
<%
nu=rs.absoluteposition
if (nu mod 2)<> 0 then%>
<tr valign="middle">
<td width="2%" valign="baseline" ><img src="1JI-tp/small/jiantou1.jpg" width="7" height="7"></td>
<td width="98%" class="hengxian" valign="top"><a href="../zixun_admin/33bbs.asp?id=<%=rs("id")%>" target="_blank"><%=title1%> 
</td>
</tr>
<%else%>
<tr>
<td valign="baseline" ><img src="1JI-tp/small/jiantou1.jpg" width="7" height="7"></td>
<td valign="top" bgcolor="#F5F5F5" class="hengxian"><a href="../zixun_admin/33bbs.asp?id=<%=rs("id")%>" target="_blank"><%=title1%></td>
</tr>
<%end if%>



<%
rs.movenext
next

%>
</table></td>
</tr>
</table>
</td>
</tr>
<form action="dianzikanwu.asp" method="post" onClick="aaa()">
<INPUT TYPE="HIDDEN" NAME="text" VALUE="<%=kwname%>&<%=kwclass%>">
<tr>
<td class="wz-neirong"><div align="center"><font color="#993399">第<%=page%>页/共<%=rs.pagecount%>页,转到第
</font>
<input name="page" type="text" size="3" maxlength="3">

<font color="#993399">页</font></div></td>
</tr>

</form>
</table><%end if%>
</td>
</tr>
</table>
</td>
</tr>

<tr>
<td><hr align="center" width="777" size="1"></td>
</tr>
<tr>
<td class="wz-neirong"> <iframe src="zuihou-x.htm" width="777" height="73" scrolling="no" align="center" frameborder="0" >您的游览器不支持iframe呀!
</iframe></td>
</tr>
</table>
</div>
</body>
</html>

...全文
56 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧