{{search}}
看到这个脚本有效,但是太快了。这个间隔功能不起作用
答案 0 :(得分:1)
我想你想要像
这样的东西var x = document.getElementsByClassName("farm_icon_c"),
(function f(i) {
if(i < x.length) {
x[i].click();
setTimeout(function() { f(i+1); }, 1e3); // Run next "iteration" in 1 second
} else {
// This code will run at "the end of the loop"
}
})(0); // Run first "iteration" immediately