JS代码中的iMacros错误

时间:2015-08-13 10:36:29

标签: javascript imacros

  参数列表后面的

SyntaxError:missing),行NaN(错误代码:   -991)

每次我尝试在iMacros中使用此代码时都会出现此错误:

var photo=1;
var macroStart;
macroStart +="CODE:";
macroStart +="SET !ERRORIGNORE YES" + "\n"; 
macroStart +="TAB T=1" + "\n"; 
macroStart +="TAG POS=" +photo+ " TYPE=DIV ATTR=CLASS:fave_photo_inner" + "\n"; 
macroStart +="TAG POS=1 TYPE=A ATTR=ONCLICK:Photoview.savePhoto()&&ID:pv_save_to_me" + "\n"; 
macroStart +="TAG POS=1 TYPE=A ATTR=ONCLICK:Photoview.hide(0)&&CLASS:fl_r<SP>pv_close_link" + "\n";

var i=0;
var number=prompt("input number of photos",5);
for (i=1; i <= number; i++)
{
iimPlay(macroStart,25)
iimDisplay("Current image is: "i)
photo++
}

iimDisplay("Success")

我做错了什么?

1 个答案:

答案 0 :(得分:1)

注意第15行中错过“+”符号的错误。必须是:

iimDisplay("Current image is: " + i);