使用 Javascript 在 Imacros 中循环
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14909553/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 22:53:27 来源:igfitidea点击:
Loop in Imacros using Javascript
提问by Debanjan Dhar
how can i loop imm(imacros) script with javascript
我如何使用 javascript 循环 imm(imacros) 脚本
I searched a little bit and found this:
我搜索了一下,发现了这个:
for (i = 0; i < n; i++)
{
iimPlay(marconame.iim);
}
but when i use it my browser(Firefox 18) hangs :\
但是当我使用它时,我的浏览器(Firefox 18)挂起:\
采纳答案by Bestmacros
for (i = 0; i < n; i++)
{
iimPlay("macroname.iim");
}
回答by macroscripts
There is this option too.
也有这个选项。
var macro;
macro ="CODE:";
macro +="TAG POS=1 TYPE=DIV ATTR=CLASS:some_class"
var n=10;
for(var i=0;i<n;i++)
{
iimPlay(macro)
}
In codes above n is not defined so it will return an error.
在上面的代码中,n 没有定义,所以它会返回一个错误。