各位前辈,帮小弟看看
循环控制变量 'for' 无效
For j = 1 to 2
代码:
<td valign="top" width="53%">
<%
set myrs_root=server.CreateObject("adodb.recordset")
myrs_root.Open "select * from t_taobao_catalog where mever='" & current_ver & "' order by InfoClsIndex",conn,1,1
if not myrs_root.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><td>
</tr>
<%For j = 1 to 7
If myrs_root.EOF Then Exit For
%>
<tr>
<%
for x=1 to 2
%>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="28" ><a href="../web/docc/taobao1.asp?catalogid=<%=myrs_root("catalogID")%>"><%=myrs_root("catalogname")%></a></td>
<td align="right"> <img alt="" style="border:0px;" src="" /> </td>
</tr>
<tr>
<td colspan="2" style="text-align: left; height:18px;">
<%
sql="select t.id,t.catalogid,t.typename from t_taobao_type t,t_taobao_catalog p where t.mever='cn' and t.catalogid=p.CatalogID"
set myrs=server.CreateObject("adodb.recordset")
myrs.open sql,conn,1,1
if not myrs.eof then
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<%For j = 1 to 2
If myrs.EOF Then Exit For
%>
<tr>
<%
for x=1 to 4
%>
<td>
<%if myrs("catalogid")=myrs_root("catalogid") then%>
<a href="docc/taobao2.asp?type_id=<%=myrs("id")%>"><%=myrs("typename")%></a>|
<%end if%>
</td>
<%
myrs.MoveNext
If myrs.EOF Then Exit For
next
%>
</tr>
<%
'myrs.MoveNext
'If myrs.EOF Then Exit For
next
%>
</table>
<%end if
myrs.close
set myrs=nothing
%>
</td>
</tr>
</table>
</td>
<td width="5%"></td>
<%
myrs_root.MoveNext
If myrs_root.EOF Then Exit For
next
%>
</tr>
<%
'myrs_root.MoveNext
'If myrs_root.EOF Then Exit For
next
%>
</table>
<%end if
myrs_root.close
set myrs_root=nothing
%>
</td>