我越来越HTML表在jQuery的Ajax响应jQuery的获得首个TD值
$.ajax({
url: '/ajaxExecute.aspx?Fn=GETFEE',
type: 'POST',
context: document.body,
cache: false,
success: function (response) {
alert(response);
});
响应包含如下表
<table border="1" id="tbl1" border="0" style="margin-left:30px;">
<thead>
<tr>
<th>fee_type</th><th>fee_amount</th><th>from_amt</th><th>to_amt</th><th>fee_percent</th><th>higher_of_two</th><th>max_capture</th><th>min_capture</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td><td>5</td><td>0</td><td>0</td><td>0.00</td><td>0</td><td>0</td><td>0</td>
</tr>
</tbody>
</table>
我想只有第一排第一个TD值即0
response.find('td').html();
在控制台我得到错误对象响应没有方法'找到'
这是你想要的,因为它只会找到第一个TD像你要求的答案。 –