从Javascript调用VBScript [英] Calling VBScript from Javascript
本文介绍了从Javascript调用VBScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经看过相关帖子了,但它只涵盖了onmouseover事件的内联VBScript,同时为onClick调用了Javascript函数。
I've seen the related post on this, but it only covers using inline VBScript for onmouseover events, while calling a Javascript Function for the onClick.
有没有办法从使用Javascript onmouseover和onmouseout事件的按钮调用onClick事件的VBScript Sub?
Is there a way to call a VBScript Sub for the onClick event from a button that uses Javascript onmouseover and onmouseout events?
目前,当我尝试收到对象不支持属性或方法的错误时。
Currently when I try I get an error that the object does not support the property or method.
推荐答案
将您的代码放入头标签
:< head> < / head>
在这些括号之间添加 VBScript
:
<script type="text/vbscript">
</script>
Function myVBFunction()
' here comes your vbscript code
End Function
// From a hardcoded link, don't write a semicolon a the end:
<a href="#" onclick="VBscript:myVBFunction('parameter')">link</a>
您可以阅读更多相关信息这里。
You can read more about it here.
这篇关于从Javascript调用VBScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文