关键在于计算要填充多少,有多少数据 对于没有填充的部分,需要用空格来填充。 需要使用Open sql, conn的方式获得数据集,以便得到recordcount参数 <table border="1" cellspacing="0" cellpadding="0"> <tr> <% Dim i '常规变量 Dim iNum '单元格总数 Dim iCol '列数 iCol = 10 iNum = CInt(oRs.RecordCount/iCol)*iCol For i = 1 To iNum %> <td> <% If IsNull(oRs("字段")) Or oRs("字段")="" Then Response.Write " " Else Response.Write oRs("字段") End If %> </td> <% If (i Mod iCol)=0 Then Response.Write("</tr>") End If oRs.MoveNext Next %> </table |
多行多列的显示函数~
最新推荐文章于 2023-03-29 16:24:32 发布