TEST.testCtrl.1在本地注册了吗?
注册后如果不行去掉版本可以吗?

解决方案 »

  1.   

    注册了,就是弹出来对话框  ,显示的内容是空的,没有内容。
    也就是说 obj.JustForTest();的返回值没有得到,我也搞不懂是为什么,
    望高手指教
      

  2.   

    我测试了一下,可以。
    我选择的工程类型是activeX DLLvb代码Public Function JustForTest()
        JustForTest = "test"
    End Function
      

  3.   

    <object></object>
    用这个
      

  4.   

    ---------------------------------------
    <object></object>
    用这个
    ---------------------------------------能否讲的详细点。
      

  5.   

    <script>
    function s(){
    // this is the method by ActiveXObject
    var obj = new ActiveXObject("prjTest.testCtrl");
    if (obj) 
    {
    var a = obj.JustForTest();
    alert(a);
    }
    }
    </script>
    <body >
    <OBJECT id="objTest" CLASSID="clsid:B1083D3F-A314-4DC9-9F67-107A1C0D6907">
    <SPAN STYLE="color:red">ActiveX 控件装入失败!
    -- 请检查浏览器的安全设置。</SPAN>
    </OBJECT>
    <input type="button" onclick="alert(objTest.JustForTest())" value="Click Me">
    </body>