现在的位置: 首页 > 综合 > 正文

[原创]定义每行每列显示的个数

2014年09月20日 ⁄ 综合 ⁄ 共 659字 ⁄ 字号 评论关闭
<!--#include file="../pub/checkuser.asp"-->
<!--#include file="../pub/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
set rs=server.CreateObject("ADODB.recordset")
rs.Open "select * from webdiy_mb ",conn,1,3
if rs.bof and rs.eof then
response.Write("没有模板")
else
'放表格的行头
%>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<%
For j = 1 to 4
if rs.EOF then Exit For
response.write("<tr>")
%>
<%For i=1 to 2

if rs.EOF then
Exit For
end if
%>
<td align="center"> <%=rs("mb_title")%> <a href="mblist.asp?id=<%=rs("id")%>"> </td>
<%
rs.movenext
Next
%>
<%
next
end if
%>
</tr>
</table>
</body>
</html>

抱歉!评论已关闭.