HTA 文件中的 JavaScript
每次当我尝试使用 vbscript 在 hta 文件中添加 javascript 时,当我单击“提交”按钮时,都会出现一条错误消息:
object doesn't support this property or method
我尝试这个
<script type="text/javascript" src=""></script>
和这个
<script type="text/javascript">
...code
</script>
有谁知道这个问题吗?
//编辑:我有问题,我忘记了 VBScript:调用 vbscript 子程序 谢谢!!
<input type="submit" value=" Submit " onclick="Submit" style="margin-left:100px;">
这是正确的:
<input type="submit" value=" Submit " onclick="VBScript:Submit" style="margin-left:100px;">
everytime when i try to add javascript in a hta file with vbscript it comes an error message when i click the submit button:
object doesn't support this property or method
I try this
<script type="text/javascript" src=""></script>
and this
<script type="text/javascript">
...code
</script>
Is there anyone who know the problem?
//EDIT: I have the problem, i forgot a VBScript: to call the vbscript sub
THANKS!!
<input type="submit" value=" Submit " onclick="Submit" style="margin-left:100px;">
This is the right one:
<input type="submit" value=" Submit " onclick="VBScript:Submit" style="margin-left:100px;">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很难确定,因为您的问题不完整,但是您可能将 Javascript 代码放入 VBScripts
标记中。
'' 就像左括号,而 '' 就像右括号。 VBScript 标签仅适用于 VBScript,Javascript 标签仅适用于 Javascript。
将以下内容放入 SILLY.HTA 中并尝试一下:
It's hard to be sure because your question is not complete, however it is likely that you are putting your Javascript code inside VBScripts
<script></script>
tags.'' is like an opening bracket, and '' is like a closing bracket. The VBScript tags are only for VBScript and the Javascript ones are only for Javascript.
Put the following in SILLY.HTA and try it out: