很急 ..谁帮忙解决下,在线等待..

zhouqing2542 2008-04-07 11:28:20
<table width="617" border="0" align="center" cellpadding="0" cellspacing="0">
<%
mytype=request("typeid")
page=request.querystring("page")
if page="" or Not IsNumeric(page) then page=1
set rs =server.CreateObject("adodb.recordset")
sql="select top 9 * from Product where typeid order by cpdate desc"
rs.open sql,conn,1,1

rs.pageSize=9
if rs.eof then

%><tr>
<td width="180" height="22" valign="middle" class="newsstyle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="484" class="font_12_23"> 暂无信息...</td>

</tr>
</table></td>
</tr>
<%
else
i=0
rs.AbsolutePage=page
while not rs.eof and i<rs.PageSize
%><tr>

<%

Set PP = New ImgWHInfo
w1=120
h1=107
pgcount=rsnew.recordcount/3
if (rsnew.recordcount mod 3)=0 then
pgcount=pgcount+1
end if

for i=1 to 3
response.Write("<tr>")
title22=""
title22=rsnew(1)

%>
<td height="177" colspan="3" align="center" valign="top" class="font_12_23"><table width="608" border="0" cellspacing="2">
<tr>
<td width="202"><table width="135" height="140" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="135" height="140" align="center" background="pict/cpbj.jpg"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><%= mysize(rsnew(2)) %></td>
</tr>
</table></td>
</tr>
<tr>
<td height="48" align="center" valign="top" class="zhengwen" style="table-layout: fixed;WORD-BREAK: break-all" ><table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="zhengwen" style="table-layout: fixed;WORD-BREAK: break-all"><%=title22%></span></td>
</tr>
</table></td>
</tr>
</table></td>
<%
if rsnew.eof then
response.write("</tr>")

exit for //这一行, 下边还有两个exit for
end if
title22=""
rsnew.movenext
next


%>
<td width="188"><table width="135" height="140" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="135" height="140" align="center" background="pict/cpbj.jpg"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><%= mysize(rsnew(2)) %></td>
</tr>
</table></td>
</tr>
<tr>
<td height="48" align="center" valign="top" class="zhengwen" style="table-layout: fixed;WORD-BREAK: break-all" ><table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="zhengwen" style="table-layout: fixed;WORD-BREAK: break-all"><%=title22%></span></td>
</tr>
</table></td>
</tr>
</table></td>

<%
if rsnew.eof then
respons.write("</tr>")
exit for
end if
rsnew.movenext

title22=""
title22=rsnew(1)


%>
<td width="204"><table width="135" height="140" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="135" height="140" align="center" background="pict/cpbj.jpg"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><%= mysize(rsnew(2)) %></td>
</tr>
</table></td>
</tr>
<tr>
<td height="48" align="center" valign="top" class="zhengwen" style="table-layout: fixed;WORD-BREAK: break-all" ><table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="zhengwen" style="table-layout: fixed;WORD-BREAK: break-all"><%=title22%></span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td> <%
if rsnew.eof then
response.write("</tr>")
exit for
end if

title22=""
rsnew.movenext
next
%>

</tr>


</table>
<table width="100%" cellpadding="0" cellspacing="0" class="font_12_23">
<tr>
<td height="22" align="center" class="font_12_23"> <!--#include file="inc/fenye.asp"-->
<%
Call FenYe("?typeid="&mytype,rs.PageCount,rs.RecordCount,page," class=font_12_23")
rs.close
set rs=Nothing
%></td>
</tr>
</table></td>
</tr>

</table> </td>
</tr>
</table>

Microsoft VBScript 编译器错误 (0x800A040F)
无效的 'exit' 语句
/product.asp, line 210, column 5
exit for




...全文
47 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
taih 2008-04-07
楼主的代码,汗!!
注意asp中的exit for 是停止for循环,它不同与javascript中的break,在asp中要实现多重循环建议更多使用if语句来实现
回复
苍白之月 2008-04-07
是很多问题
回复
vibirds 2008-04-07
for ...
...
exit for
next

exit for得放在for跟next之间,for跟next是成对出现的,你后边的两个嵌套都有问题
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2008-04-07 11:28
社区公告
暂无公告