如何按5行6列的形式显示数据
调用数据库数据30条记录项,想通过5行,每行6项的形式显示所有数据,请问如何实现,谢谢
------解决方案-------------------- <style>
.top {width:660px;}
.top ul {width:600px;}
.haha {width:99px; float:left; border:1px solid #f00;}
}
</style>
<div class= "top ">
<ul>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
<li class= "haha "> 1 </li>
</ul>
</div>
------解决方案--------------------i=1
循环
if (i mod 5)=0 then
response.write "记录 <br> "
else
response.write "记录 "
i=i+1
end if
------解决方案--------------------调试地址:http://www.cnbruce.com/test/function/index.asp
下载查看: http://www.cnbruce.com/test/function/function.rar
------解决方案-------------------- <%for i=1 to 5%>
<tr>
<% for ii=1 to 6 %>
<td> <%=i%> - <%=ii%> </td>
<%next%>
</tr>
<%next%>
===============================================
<%for i=1 to 5%>
<uL>
<% for ii=1 to 6 %>
<li> <%=i%> - <%=ii%> </li>
<%next%>
</tr>
<%next%>
顺便说下 baijianlong813()
他这个要MOD的 因为很清楚了
循环嵌套就可以了