gpt4 book ai didi

javascript - 是否可以从 html 中的 javascript 调用 .vbs 文件?

转载 作者:行者123 更新时间:2023-12-03 10:25:54 24 4
gpt4 key购买 nike

1)测试.vbs

Function demo()
msgbox "Welcome to Follow Tutorials"
End Function

2)test1.html

    <meta http-equiv="x-ua-compatible" content="IE=10">
<title>Follow Tutorials</title>
<script type="text/vbscript" src="test.vbs"></script>
</head>
<body>
<h2>Placement of VBScript in head section</h2>
<input type="button" onclick="demo()" value="Follow Tutorials"/>
<p>Click to see event </p>
</body>

上面是我尝试作为一个简单示例运行的代码。函数 demo() 位于单独的文件 test.vbs 中,我想在单击按钮时从 html 页面调用该文件。

我使用的是 IE11,而 IE11 不支持 vbscript。那么有没有办法可以从 html 中的 javascript 调用 vbs 文件?

请注意是否删除了本文中的 html 标记,因为它不允许我发布问题

最佳答案

IE11 正在尝试删除对 VBScript 的支持,因此添加 <script language="vbscript">不管用。正在查看this question应该可以帮助您找出解决方法。如果您想出解决方法,请发布您的问题的解决方法。

关于javascript - 是否可以从 html 中的 javascript 调用 .vbs 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29405936/

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