在asp.net中,我有一个树视图控件,可以创建以下HTML元素:
<div id="MainContent_TreeView1">
<table>
<tr>
<td><a id="MainContent_TreeView1n0" ></a></td><td ><a class="MainContent_TreeView1_0" id="MainContent_TreeView1t0">node1</a></td>
</tr>
</table><div id="MainContent_TreeView1n0Nodes" >
<table>
<tr>
<td><div style="width:20px;height:1px"></div></td><td><a class="MainContent_TreeView1_0" >node1-1</a></td>
</tr>
</table>
</div><table>
<tr>
<td><a id="MainContent_TreeView1n2"></a></td><td ><a class="MainContent_TreeView1_0" id="MainContent_TreeView1t2">node2</a></td>
</tr>
</table><div id="MainContent_TreeView1n2Nodes" >
<table>
<tr>
<td><div style="width:20px;height:1px"></div></td><td></td><td ><a class="MainContent_TreeView1_0" id="MainContent_TreeView1t3">node2-1</a></td>
</tr>
</table>
</div><table>
<tr>
<td></td><td ><a class="MainContent_TreeView1_0" id="MainContent_TreeView1t4">node3</a></td>
</tr>
</table>
</div>
但是,我需要它来生成ul
和li
元素。我该怎么做?