javascript - 使用 VBA 显示 javascript 警报

标签 javascript internet-explorer vba excel

我已经设法通过 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/

相关文章:

javascript - TimePicker Razor ASP.NET-MVC

javascript - Express.js 请求参数未定义

javascript - 将文件从 Windows 资源管理器拖放到 Internet Explorer

jquery - Popup Jquery 适用于除 IE7 以外的所有浏览器

excel - 获取零件之间的字符串

javascript - jQuery - 不确定如何在使用 .each 时重置数组的最大值

javascript - Kendo UI 2019 在使用 requirejs JavaScript 时返回未定义

css - IE 8,9 z-index 错误

mysql - 使用 SQL 选择在何处设置 ComboBox Rowsource

c# - 向 COM 公开 .NET 事件?