這裏內選擇文字是我的代碼片段:jquery選擇 - 一個特定的標籤
<div class="totals">
<table id="shopping-cart-totals-table">
<col />
<col width="1" />
<tfoot>
<tr>
<td style="" class="a-right" colspan="1">
<strong>Grand Total</strong>
</td>
<td style="" class="a-right">
<strong><span class="price">$364.99</span></strong>
</td>
</tr>
</tfoot>
<tbody>
<tr>
<td style="" class="a-right" colspan="1">
Subtotal </td>
<td style="" class="a-right">
<span class="price">$354.99</span> </td>
</tr>
<tr>
<td style="" class="a-right" colspan="1">
Shipping & Handling (Flat Rate - Fixed) </td>
<td style="" class="a-right">
<span class="price">$10.00</span> </td>
</tr>
</tbody>
</table>
我將如何使用jQuery選擇類「價格」的第一跨度和標籤中指定的「$ 364.99」文本變量?
jQuery的'get'返回沒有'text()'函數的DOM對象。 –
你是如此正確!使用'eq'代替。 – Aliostad