[英]Javascript Help For Chrome Console? Clicking All links website
this website wants me to click ALL the links on the page (there's about 2000). 该网站希望我单击页面上的所有链接(大约有2000个)。
This is the code for each link: 这是每个链接的代码:
<a href="#" id="27426879" class="unfollow">UNFOLLOW</a>
the ID changes all the time depending on the link. ID始终根据链接而变化。
Is it possible to supply me the javascript code to write into the console of google chrome to click ALL the "a" tags with the class of "unfollow" at once? 是否可以向我提供javascript代码,以便将其写入Google chrome的控制台中,以立即单击所有具有“取消关注”类的“ a”标签? thanks :)
谢谢 :)
How about? 怎么样?
var links = document.querySelectorAll("a.unfollow[href=#]");
for (var i = 0; i < links.length; ++i) {
links[i].click();
}
谢谢我使用聊天室,此代码很容易工作:$('a.unfollow')。click()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.