这是JQuery中的命令:
evaluationDependsOnChildren()
我想在JS中制作它。我试过这个:
$("li.info-item div.body h3.name a[href*="infor"]")
,错误是:
document.querySelector("li.infor-item div.body h3.name a[href*="infor"]")
答案 0 :(得分:3)
你在双引号内使用双引号尝试使用单引号并使用querySelectorAll而不是querySelector来获取所有匹配的元素。
document.querySelectorAll('li.infor-item div.body h3.name a[href*="infor"]')