vb activex 传递参数
我用VB写了一个activex,现在想在js里面向activex传值,写了一个public方法不行,写了一个属性也不行,请高手指点,在线等候,代码如下
变量声明
Dim dirName As String = ""
方法
Public Sub UrlName(ByRef tt As String)
dirName = tt
End Sub
属性
Public Property StrName1() As String
Get
Return strName
End Get
Set(ByVal value As String)
strName = value
End Set
End Property
js调用
<html>
<head>
<script type="text/vbscript" language="vbscript">
function aa()
{
var objClass=document.getElementById("objClass");
objClass.UrlName("d:\123");
}
</script>
</head>
<body onload="aa();">
<object id="objClass" classid="clsid:CA04D92A-0AFA-3736-BC23-4EF99B7BF91F"></object>
</body>
</html>
[解决办法]