- $('li').not(':even').css('background-color', 'red');
- $('li').not(document.getElementById('notli'))
- .css('background-color', 'red');
- $("div").not(".green, #blueone")
- .css("border-color", "red");
- Example: Removes the element with the ID "selected" from the set of all paragraphs.
- $("p").not( $("#selected")[0] )
- Example: Removes the element with the ID "selected" from the set of all paragraphs.
- $("p").not("#selected")
- Example: Removes all elements that match "div p.selected" from the total set of all paragraphs.
- $("p").not($("div p.selected"))
- $("#reset").click(function() {
- $(':input','#fundingpossibility')
- .not(':button, :submit, :reset, :hidden, #test')
- .val('');
- });
本文深入探讨了JavaScript中选择器的高级应用技巧,包括如何使用not()方法排除特定元素,以及复杂的元素筛选策略。

1753

被折叠的 条评论
为什么被折叠?



