IMacros:如何使用 javascript 提示
IMacros: How to use Prompt with javascript
好的,在下面的代码中,您可以看到我必须将 Page 和 Search 放在引号中,但是 javascript
"thinks" 我要关闭 [= 之前的引号11=]提示.
有人知道我应该用它做什么吗?
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 中,因为我稍后会添加一些循环
对不起,英语不是我的母语。
var x='PROMPT \"Page\" ';
document.getElementById("demo").innerHTML = x ;
<p id="demo"></p>
检查代码并据此调整
好的,在下面的代码中,您可以看到我必须将 Page 和 Search 放在引号中,但是 javascript
"thinks" 我要关闭 [= 之前的引号11=]提示.
有人知道我应该用它做什么吗?
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 中,因为我稍后会添加一些循环
对不起,英语不是我的母语。
var x='PROMPT \"Page\" ';
document.getElementById("demo").innerHTML = x ;
<p id="demo"></p>
检查代码并据此调整