回 帖 发 新 帖 刷新版面

主题:求助: 表格循环排列问题! 好心人请解答!

[em7] 本人菜鸟~ `` 请问如何把table里面的表格排4行5列,本菜鸟只会行排或者列循环排,就是不会行和列一起同时循环排列`~~ 

---------------------------------------------------------------------------
                  <table width="150" border="0" align="left" cellpadding="8" cellspacing="0">
                    <tr>
                      <td valign="top"><table width="137" border="0" align="left" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="137" height="82" class="biao4"><img src="<%=(Reanli.Fields.Item("img").Value)%>" width="150" height="120" /></td>
                          </tr>
                          <tr>
                            <td height="24" align="center" valign="middle" bgcolor="#F2F4FF" class="biao4"><a href="<%=(Reanli.Fields.Item("url").Value)%>" target="_blank"><%=(Reanli.Fields.Item("title").Value)%></a></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>

----------------------------------------------------------------------------

回复列表 (共6个回复)

沙发

<table>
 <%
 for i=1 to 20
 if i mod 5=1 then
  response.write "<tr>"
 end if
 response.write "<td>"&i&"</td>"
 if i mod 5=0 then
  response.write "</tr>"
 end if
 next
 %>
</table>
是不是这个

板凳

嗯,我也知道这样写,但是不知道如果把整个table定义为一个变量????
困扰多天的问题,麻烦高手解答一吓!~`

3 楼

把整个table放到一个数据库字段中即可

4 楼

先非常感谢楼上的解答,但是在下还不是很懂,<table>里面已经有Retitle等数据记录,如何把<table>数据字段中??? 
因为本人开始是用dw做asp的,现在才赶上学asp,此问题已困扰多天了.... 
还望请详细指教后辈~` 相信后辈明天也会在这为新手指点困扰``~~

5 楼

能不能说一下你想需要什么功能?

6 楼

就是把<table>整个表里面的数据记录按行和列循环排列!``` ~~` 
即是把下面的内容行列循环排!~` 

---------------------------------------------------------------------------
                  <table width="150" border="0" align="left" cellpadding="8" cellspacing="0">
                    <tr>
                      <td valign="top"><table width="137" border="0" align="left" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="137" height="82" class="biao4"><img src="<%=(Reanli.Fields.Item("img").Value)%>" width="150" height="120" /></td>
                          </tr>
                          <tr>
                            <td height="24" align="center" valign="middle" bgcolor="#F2F4FF" class="biao4"><a href="<%=(Reanli.Fields.Item("url").Value)%>" target="_blank"><%=(Reanli.Fields.Item("title").Value)%></a></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>

----------------------------------------------------------------------------

请帮忙解答~`` 谢谢~

我来回复

您尚未登录,请登录后再回复。点此登录或注册