asp怎么用两种样式在循环的情况下,代码如下:
<%
set rs=server.CreateObject("adodb.recordset")
sql="select top 2 * from caseSuc where Menuid=546 and cname='1' order by ID asc"
rs.open sql,Conn,1,3
do while not rs.eof
%>
<table style=" margin-top:10px; width:1024px;">
<tr>
<td width="500" height="225" ><a title="<%=rs("title")%>" href="dispTable.asp?tab=caseSuc&id=<%=rs("ID")%>"> <img src="<%=rs("TabImages")%>" width="500" height="225" style="border:solid 1px #CCC;" />
</a></td>
<td width="480" height="225" align="right">
<div style=" font-family:'微软雅黑'; font-size:20px;color:#5b5b5b; font-weight:500; text-align:center;"><%=rs("title")%></div>
<div style="text-align:left;"><%=left(rs("cMode"),100)%></div>
</td>
</tr>
</table>
<table style=" margin-top:10px; width:1024px;">
<tr>
<td width="500" height="225" ><%=left(rs("cMode"),100)%></td>
<td width="480" height="225" align="right">
<div style=" font-family:'微软雅黑'; font-size:20px;color:#5b5b5b; font-weight:500; text-align:center;"><%=rs("title")%></div>
<div style="text-align:left;"><a title="<%=rs("title")%>" href="dispTable.asp?tab=caseSuc&id=<%=rs("ID")%>"> <img src="<%=rs("TabImages")%>" width="500" height="225" style="border:solid 1px #CCC;" />
</a></div>
</td>
</tr>
</table>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
做成
A B
B A
循环,
求大神赐教,谢谢
<%
set rs=server.CreateObject("adodb.recordset")
sql="select top 2 * from caseSuc where Menuid=546 and cname='1' order by ID asc"
rs.open sql,Conn,1,3
do while not rs.eof
%>
<table style=" margin-top:10px; width:1024px;">
<tr>
<td width="500" height="225" ><a title="<%=rs("title")%>" href="dispTable.asp?tab=caseSuc&id=<%=rs("ID")%>"> <img src="<%=rs("TabImages")%>" width="500" height="225" style="border:solid 1px #CCC;" />
</a></td>
<td width="480" height="225" align="right">
<div style=" font-family:'微软雅黑'; font-size:20px;color:#5b5b5b; font-weight:500; text-align:center;"><%=rs("title")%></div>
<div style="text-align:left;"><%=left(rs("cMode"),100)%></div>
</td>
</tr>
</table>
<table style=" margin-top:10px; width:1024px;">
<tr>
<td width="500" height="225" ><%=left(rs("cMode"),100)%></td>
<td width="480" height="225" align="right">
<div style=" font-family:'微软雅黑'; font-size:20px;color:#5b5b5b; font-weight:500; text-align:center;"><%=rs("title")%></div>
<div style="text-align:left;"><a title="<%=rs("title")%>" href="dispTable.asp?tab=caseSuc&id=<%=rs("ID")%>"> <img src="<%=rs("TabImages")%>" width="500" height="225" style="border:solid 1px #CCC;" />
</a></div>
</td>
</tr>
</table>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
做成
A B
B A
循环,
求大神赐教,谢谢