<style> td{border:1px solid} </style> <table> <tr> <td>1</td> <td> <table> <tr> <td>11</td> <td> <table> <tr> <td>111</td> </tr> <tr> <td>222</td> </tr> <tr> <td>333</td> </tr> </table> </td> </tr> <tr> <td>22</td> <td> <table> <tr> <td>111</td> </tr> <tr> <td>222</td> </tr> <tr> <td>333</td> </tr> </table> </td> </tr> <tr> <td>33</td> <td> <table> <tr> <td>111</td> </tr> <tr> <td>222</td> </tr> <tr> <td>333</td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td>2</td> <td> <table> <tr> <td>11</td> <td> <table> <tr> <td>111</td> </tr> <tr> <td>222</td> </tr> <tr> <td>333</td> </tr> </table> </td> </tr> <tr> <td>22</td> <td> <table> <tr> <td>111</td> </tr> <tr> <td>222</td> </tr> <tr> <td>333</td> </tr> </table> </td> </tr> <tr> <td>33</td> <td> <table> <tr> <td>111</td> </tr> <tr> <td>222</td> </tr> <tr> <td>333</td> </tr> </table> </td> </tr> </table> </td> </tr> </table>
套三层table,程序上就是套三个for循环,每个循环输出子级内容。。。
我觉的不错,不知道你做出来了不,我关注中
可以使用<table>中<td>属性rowspan(规定此单元格可横跨的行数)!
实现大概思路是:
父类的rowspan为子集的rowspan总和,子类的rowspan为子子集rowspan的总和,最小级的rowspan为1。
你把数据库里表的字段贴出来啊,要不然谁知道怎么帮你。