使用VBA显示javascript警报

Show javascript alert with VBA

本文关键字:警报 javascript 显示 VBA 使用      更新时间:2023-10-16

我已经设法通过excel打开IE并使用它进行导航,但我无法运行基本的JS函数,如"alert"或"prompt"。(在浏览器中,而不是excel中的MsgBox)我试过:

appIE.document.onLoad = "function() { alert(""text"");};"

知道吗?

appIE.document.parentWindow.execScript "alert('text');", "jscript"