js是否可以选择不包含类特定部分的特定元素,例如:
// This line seems to be an invalid query parameter, so I am curious if it's actually feasible to achieve that?
const queryResult = document.querySelectorAll(`ul:not('.*__list')`);
const queryResult = document.querySelectorAll(`ul`);
console.log(queryResult)
<div>
<ul>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<button>button</button>
</ul>
<ul class="abstractPrefix__list">
<li>
<button class="abstractPrefix__button">button</button>
</li>
</ul>
</div>
月关宝盒
小怪兽爱吃肉
相关分类