循环中表格定位的左右两列显示方法
类别: ASP教程
<% Set = rs ……………………
\'循环前提省略
Response.Write("<table width=""100%"" border=""1"" align=""center"" cellpadding=""4"" cellspacing=""4"">")
Response.Write("<tr><td valign=""top"" width=""50%"">")
i=1
Do While not rs.eof
Response.Write("输出内容")
if i mod 2 = 0 then
Response.Write("</td></tr><tr><td>")
else
Response.Write"</td><td>"
end if
rs.MoveNext
i = i + 1
Loop
Response.write"</td></tr>"
Response.Write("</table>")
%>
\'循环前提省略
Response.Write("<table width=""100%"" border=""1"" align=""center"" cellpadding=""4"" cellspacing=""4"">")
Response.Write("<tr><td valign=""top"" width=""50%"">")
i=1
Do While not rs.eof
Response.Write("输出内容")
if i mod 2 = 0 then
Response.Write("</td></tr><tr><td>")
else
Response.Write"</td><td>"
end if
rs.MoveNext
i = i + 1
Loop
Response.write"</td></tr>"
Response.Write("</table>")
%>
- 上一篇: 如何防范SQL注入
- 下一篇: SQL SERVER与ACCESS、EXCEL的数据转换
-= 资 源 教 程 =-
文 章 搜 索