我正在寻找将属性(href)添加到表的 td 中。
我猜jQuery会工作!
我需要帮助请...
网址:http://mysite
原表:
<table>
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Url</th>
</tr>
</thead>
<tbody>
<tr class='Collection'>
<td>Collection</td>
<td>Collection1</td>
<td>/Collection1</td>
</tr>
<tr class='Site'>
<td>Site</td>
<td>Site1</td>
<td>/site1</td>
</tr>
</tbody>
</table>
所以结果是:
<table>
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Url</th>
</tr>
</thead>
<tbody>
<tr class='Collection'>
<td>Collection</td>
<td>Collection1</td>
<td><a href="http://mysite/Collection1">/Collection1</a></td>
</tr>
<tr class='Site'>
<td>Site</td>
<td>Site1</td>
<td><a href="http://mysite/site1">/site1</a></td>
</tr>
</tbody>
</table>