【发布时间】:2012-08-09 05:32:54
【问题描述】:
我想要做的是选择文档上的所有输入按钮,除了那些驻留在特定 id 下的按钮。
例子:
<body>
<input type="button">
<div id="something">
<input type="button">
</div>
<div id="something2">
<input type="button">
</div>
<input type="button">
<input type="button">
<input type="button">
</body>
例如,我想选择所有输入,除了那些位于<div> 下的输入,其id 是“某物”。
我尝试过的:
1) $('input[type="button"]:not(:parent(#something))').addCSS();
2) $('input[type="button"] :not(#something input[type="button"])')
和其他类似的方法
【问题讨论】:
标签: jquery html selector except