我已经设法通过 excel 打开 IE 并使用它进行导航,但我无法运行基本的 JS 功能,如“警报”或“提示”。 (在浏览器中,而不是在 excel 中的 MsgBox) 我试过:
appIE.document.onLoad = "function() { alert(""text"");};"
有什么想法吗?
最佳答案
appIE.document.parentWindow.execScript "alert('text');", "jscript"
关于javascript - 使用 VBA 显示 javascript 警报,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20225806/