我正在做一个书店,想添加一个花哨的jquery订单。关键是,用户应使用减号和加号按钮选择一本书的数量,然后让javascript计算该书的总金额。
我有如下标记:
<tr>
<td><p>Book title</p></td>
<td><p><a href="#" class="bookDecrement">-</a><input type="text" class="bookQuantity disabled" disabled /><a href="#" class="bookIncrement">+</a></p></td>
<td><p><input type="text" class="bookPrice disabled" value="70" disabled /></p></td>
<td><p>=</p></td>
<td><p><input type="text" class="bookTotal disabled" disabled /></p></td>
</tr>
如何通过jquery到达此行的bookprice和booktotal类?因为我有多个书名,所以我只需要访问当前行中的输入文件。
谢谢!