Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
var deleteTarget = $('ul li .active'); deleteTarget.remove();
不知道出了什么问题,控制台说has no method,还是我还要使用$(deleteTarget)?
has no method
$(deleteTarget)
$在你的情况下显然不是 jQuery。
$
您可以检查它是否与:
console.log($().jquery); // if undefined, it's not jQuery
你可以试试这个吗???
$("ul li").remove(".active");
我试着把这个网站的代码混在一起
您的 jquery 字符串几乎可以肯定是错误的。
#身份证查询
#
你可能想做:
var deleteTarget = $('ul li .active');