我想根据名为“level”的属性进行过滤。
在我写过的地方——这里有一些东西——我不知道如何引用 level 属性。如果它是一个 id 属性,我会做 #idName,如果它是一个类,我会做 .className。
我不知道如何选择级别属性。
$(".myClass").filter(--something here to reference the level attribute --).remove();
最佳答案
过滤器("[level='2']")
关于jquery - 如何在不是类或 id 的属性上使用 jQuery filter(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2578508/