gpt4 book ai didi

javascript - imacros javascript window.onload 不工作

转载 作者:行者123 更新时间:2023-11-30 00:14:31 25 4
gpt4 key购买 nike

我运行了我的脚本几次,但无法弄清楚为什么 window.onload 不工作。我做错了什么?

 var macro = "CODE:";
macro += "VERSION BUILD=9002379" + "\n";
macro += "TAB T=1" + "\n";
macro += "TAB CLOSEALLOTHERS" + "\n";
macro += "SET !EXTRACT_TEST_POPUP YES" + "\n";
macro += "SET !TIMEOUT_STEP 60" + "\n";
macro += "SET !TIMEOUT_PAGE 60" + "\n";
macro += "SET !ERRORIGNORE YES" + "\n";
macro += "SET !DATASOURCE C:\\imacros\\test.csv" + "\n";
macro += "SET !DATASOURCE_COLUMNS 1" + "\n"
macro += "SET !DATASOURCE_LINE 1" + "\n";
macro += "URL GOTO={{!COL1}}" + "\n";
function addlisteners(){
window.alert("Boo !");
}
window.onload = addlisteners;

iimPlay(macro);

最佳答案

I am not sure what you tried to do with the script above but this code works fine.

var macro = "CODE:";
macro += "VERSION BUILD=9002379" + "\n";
macro += "TAB T=1" + "\n";
macro += "TAB CLOSEALLOTHERS" + "\n";
macro += "SET !EXTRACT_TEST_POPUP YES" + "\n";
macro += "SET !TIMEOUT_STEP 60" + "\n";
macro += "SET !TIMEOUT_PAGE 60" + "\n";
macro += "SET !ERRORIGNORE YES" + "\n";
macro += "SET !DATASOURCE C:\\imacros\\test.csv" + "\n";
macro += "SET !DATASOURCE_COLUMNS 1" + "\n"
macro += "SET !DATASOURCE_LINE 1" + "\n";
macro += "URL GOTO={{!COL1}}" + "\n";




iimPlay(macro);

addlisteners();


function addlisteners() {
alert("Boo !");
}

现在怎么样?

关于javascript - imacros javascript window.onload 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35235641/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com