我有这个表:什么方法最好使用JQuery将数据输入到HTML表格中?
<div id="customer-content">
<table>
<caption>Customer Details</caption>
<tr>
<th>Customer no</th>
<td>customer-no</td>
</tr>
<tr class="alt">
<th>First name</th>
<td>first-name</td>
</tr>
<tr>
<th>Last name</th>
<td>last-name</td>
</tr>
<tr class="alt">
<th>Phone number</th>
<td>phone-number</td>
</tr>
<tr>
<th>Date of birth</th>
<td>dob</td>
</tr>
</table>
</div>
的是通过jQuery输入一些数据到它的最佳方式:
$('div#customer-content table tr td').text('1234');
以上是OK的客户没有,但我怎么做休息?
,将设置所有TD的文本1234 – 2013-03-05 19:36:29
我怎么会那么针对每个单独? – 2013-03-05 19:38:45