我有一個HTMLjQuery。獲取標記+類名
<table>
<tbody>
<tr>
<td>
<input name="price" class="chrome-input" />
</td>
<td>
<button name="sellButton" class="chrome-button">
</button>
<button name="priceButton" class="chrome-button">
</button>
</td>
</tr>
</tbody>
</table>
我怎樣才能tr
包含與chrome-button
類內部控制。 像這樣
alert($("tr+.chrome-button").html());
這應該是最快的,因爲僞選擇器是通常要慢得多。 – Ben 2011-04-06 19:47:41