gpt4 book ai didi

jQuery。获取标签+类名

转载 作者:行者123 更新时间:2023-12-01 00:43:42 27 4
gpt4 key购买 nike

我有那个 html

<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>

如何获得包含 chrome-button 类控件的 tr 。像这样的事情

alert($("tr+.chrome-button").html());

最佳答案

$(".chrome-button").closest('tr')

关于jQuery。获取标签+类名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5571867/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com