日期:2014-05-17 浏览次数:21053 次
Response.Write "<table style='width:100%;'>" Response.Write vbCrLf While Not rs.EOF Response.Write "<tr>" Response.Write vbCrLf For m = 1 To 5 If rs.EOF Then Response.Write "<td> </td>" Else Response.Write "<td>" & rs("id") & "</td>" rs.MoveNext End If Response.Write vbCrLf Next Response.Write "</tr>" Response.Write vbCrLf Wend Response.Write "</table>"
------解决方案--------------------
原理就是这样了,把数据库操作的加进去就行了,把iii =iii+1 这样的改成指针向下移
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> </head> <% X = 10 '定义行数 Y = 5 '定义列数 iii = 1 %> <body> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <%for i=1 to Y%> <td align="center"><table width="98%" border="1" cellpadding="2" cellspacing="1"> <%for j=1 to x%> <tr> <td height="19" align="center"> <% response.write("ID: " & iii) iii = iii + 1 %> </td> </tr> <%Next%> </table></td> <%Next%> </tr> </table> </body> </html>