2015-01-06 43 views
2

好吧,所以在下面的代碼中,你可以看到,我必須將頁面和搜索引號,但然後javascript「認爲」我正在關閉之前的引號PROMPTIMacros:如何使用提示與javascript

任何人都知道我該怎麼處理它?

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中,因爲我會添加一些循環後

對不起失誤,英語不是我的母語。

+0

寫下與 '提示' 以這種方式你的線條調整: '!提示 「頁面」 VAR1''宏+ = +「 \ n「;' – Shugar

回答

0

var x='PROMPT \"Page\" '; 
 
document.getElementById("demo").innerHTML = x ;
<p id="demo"></p>

檢查代碼並根據該

+0

不工作,但thx嘗試 –

+0

通過在那裏檢查代碼片段 –