ASP 菜单自动换行

来源:百度知道 编辑:UC知道 时间:2024/05/14 18:27:47
<%for i=1 to rs.recordcount%>
<td height="30" width="120" bordercolor="#FFFFFF" style="background-color: #FFFFFF"><a href="<%="..\"&rs("path")%>"><%=rs("name")%></a> </td>
<%if (i mod 8)=0 then
response.write "<br>"
end if
rs.movenext
next%>

-----------------------------
我的本意是当它输出到第八个时自动换行,但却不能,请高手帮看看怎么回事

你这个明显不对啊。你这里表格,就算打入自动换行<br>也是没用的。
你要用<tr></tr>
这里的话你用
<tr>
<%for i=1 to rs.recordcount%>
<td height="30" width="120" bordercolor="#FFFFFF" style="background-color: #FFFFFF"><a href="<%="..\"&rs("path")%>"><%=rs("name")%></a> </td>
<%if (i mod 8)=0 then
response.write "</tr><tr>"
end if
rs.movenext
next%>