好的,下面的代码中您可以看到我必须把Page和Search放在引号中,但是javascript
会“认为”我正在关闭PROMPT之前的引号。
有人知道该怎么处理吗?
var macro;
macro = "CODE:";
macro += "PROMPT "Page" !VAR1" + "\n";
macro += "PROMPT "Search" !VAR2" + "\n";
macro += "TAB OPEN" + "\n";
macro += "TAB T=2" + "\n";
macro += "URL GOTO=https://{{!VAR1}}" + "\n";
macro += "SET !ERRORIGNORE YES" + "\n";
macro += "SET !TIMEOUT_TAG 3" + "\n";
macro += "SET !TIMEOUT_PAGE 3" + "\n";
macro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:masthead-search ATTR=ID:masthead-search-term CONTENT={{!VAR2}}" + "\n";
macro += "TAG POS=1 TYPE=BUTTON FORM=ID:masthead-search ATTR=ID:search-btn" + "\n";
macro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:gbqf ATTR=ID:gbqfq CONTENT={{!VAR2}}" + "\n";
macro += "TAG POS=1 TYPE=BUTTON FORM=ID:gbqf ATTR=ID:gbqfb" + "\n";
macro += "SET !ERRORIGNORE NO" + "\n";
macro += "SET !TIMEOUT_PAGE 60" + "\n";
macro += "SET !TIMEOUT_TAG 60" + "\n";
iimPlay(macro);
附加信息:
- 我使用的是 Windows 7 和 Firefox 浏览器。
- 我希望它是 JavaScript,因为我之后会添加一些循环。
抱歉,我的母语不是英语。
macro + ='PROMPT"页面"! VAR1'+ "\ n";
- Shugar