do while not rs.eof写错了么?
<tablewidth="99%"border="0"cellpadding="0"cellspacing="0"><tr><%j=1dowhilenotSort2Lis...
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<%
j=1
do while not Sort2ListRs.eof
%>
<td align=center>
<table width="120" height="26" border="0" cellpadding="5" background="images/lbg.jpg" bgcolor="#FDF3DA">
<tr>
<td align="center" background=images/top_04.jpg> <a href="NewsList.Asp?Id=<%= Sort2ListRs("id") %>" ><%= Sort2ListRs("sort_name") %></a></td>
</tr>
</table>
</td>
<%if j mod 2 = 0 then %>
</tr>
<%end if%>
<% Sort2ListRs.movenext
j=j+1
loop
Sort2ListRs.close
set Sort2ListRs=nothing
%>
</table>
Sort2ListSQL="Select * From system_text_sort Where big_id ="& Sort1ListRs("big_id") &" Order By sx "
Set Sort2ListRs=Server.CreateObject("ADODB.recordset")
Sort2ListRs.Open Sort2ListSQL,conn,3,3,1
为什么
<%
For i = 1 To NewsListRs.PageSize
If NewsListRs.EOF Then
Exit For
End If
%>
<tr>
<td width="519" height="33" class=xxls colspan="3"> ·<a Href="News.asp?ID=<%=NewsListRs("ID")%>" target="_blank"><%=NewsListRs("Title")%></a></td>
<td width="92" height="33" class=xxls> </td>
<td width="157" height="33" class=xxls> <%=NewsListRs("Dateandtime")%> </td>
</tr>
<%
NewsListRs.MoveNext
Next
%>
</table>
<%
If i = 1 Then
Response.Write "没有新闻记录!"
End If
%>
执行不到 ie就死掉了 展开
<tr>
<%
j=1
do while not Sort2ListRs.eof
%>
<td align=center>
<table width="120" height="26" border="0" cellpadding="5" background="images/lbg.jpg" bgcolor="#FDF3DA">
<tr>
<td align="center" background=images/top_04.jpg> <a href="NewsList.Asp?Id=<%= Sort2ListRs("id") %>" ><%= Sort2ListRs("sort_name") %></a></td>
</tr>
</table>
</td>
<%if j mod 2 = 0 then %>
</tr>
<%end if%>
<% Sort2ListRs.movenext
j=j+1
loop
Sort2ListRs.close
set Sort2ListRs=nothing
%>
</table>
Sort2ListSQL="Select * From system_text_sort Where big_id ="& Sort1ListRs("big_id") &" Order By sx "
Set Sort2ListRs=Server.CreateObject("ADODB.recordset")
Sort2ListRs.Open Sort2ListSQL,conn,3,3,1
为什么
<%
For i = 1 To NewsListRs.PageSize
If NewsListRs.EOF Then
Exit For
End If
%>
<tr>
<td width="519" height="33" class=xxls colspan="3"> ·<a Href="News.asp?ID=<%=NewsListRs("ID")%>" target="_blank"><%=NewsListRs("Title")%></a></td>
<td width="92" height="33" class=xxls> </td>
<td width="157" height="33" class=xxls> <%=NewsListRs("Dateandtime")%> </td>
</tr>
<%
NewsListRs.MoveNext
Next
%>
</table>
<%
If i = 1 Then
Response.Write "没有新闻记录!"
End If
%>
执行不到 ie就死掉了 展开
1个回答
展开全部
<div align=center>
<table width="150" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align=center>
<table width="120" height="26" border="0" cellpadding="5" background="images/lbg.jpg" bgcolor="#FDF3DA">
<%
j=0
Sort2ListSQL="Select * From system_text_sort Where big_id ="& Sort1ListRs("big_id") &" Order By sx "
Set Sort2ListRs=Server.CreateObject("ADODB.recordset")
Sort2ListRs.Open Sort2ListSQL,conn,2,2
If not Sort2ListRs.eof then
do while not Sort2ListRs.eof
if j/2=j\2 then
%><tr><% end if %>
<td align="center" background=images/top_04.jpg> <a href="NewsList.Asp?Id=<%= Sort2ListRs("id") %>" ><%= Sort2ListRs("sort_name") %></a></td>
<%
j=j+1
Sort2ListRs.movenext
loop
else
Response.Write "没有新闻记录!"
end if
Sort2ListRs.close
set Sort2ListRs=nothing
%></tr></table>
</td></table></div>
已经调试过,没有问题
<table width="150" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align=center>
<table width="120" height="26" border="0" cellpadding="5" background="images/lbg.jpg" bgcolor="#FDF3DA">
<%
j=0
Sort2ListSQL="Select * From system_text_sort Where big_id ="& Sort1ListRs("big_id") &" Order By sx "
Set Sort2ListRs=Server.CreateObject("ADODB.recordset")
Sort2ListRs.Open Sort2ListSQL,conn,2,2
If not Sort2ListRs.eof then
do while not Sort2ListRs.eof
if j/2=j\2 then
%><tr><% end if %>
<td align="center" background=images/top_04.jpg> <a href="NewsList.Asp?Id=<%= Sort2ListRs("id") %>" ><%= Sort2ListRs("sort_name") %></a></td>
<%
j=j+1
Sort2ListRs.movenext
loop
else
Response.Write "没有新闻记录!"
end if
Sort2ListRs.close
set Sort2ListRs=nothing
%></tr></table>
</td></table></div>
已经调试过,没有问题
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询