日期:2014-05-17  浏览次数:20892 次

JS调用OCX时,提示对象不支持此属性或方法
VB开发的ocx,在VB中用exe和网页调试都通过
现在使用js调用时,提示对象不支持此属性或方法
控件也注册了,也提示安装了 
为什么 谢谢 
JScript code

<script type="text/javascript">


function bmpsend(){

    alert(1);
var Request = " /test/go.do";

var RequestPath = "http://192.168.10.163:8080/test/go.do";

var RequestHost = "192.168.10.163:8080";

var FileName = "c:\\test.bmp";

var IPAdress = "192.168.10.163";

    
    alert(bmpUpload);
    bmpUpload.sendData(Request, RequestPath, RequestHost, FileName, IPAdress);    
    bmpUpload.Command1_Click;
    alert(bmpUpload.FileName);
}

</script>

</head>
<object
      classid="clsid:F6FAA59F-83D8-41D2-9233-45F2C4F2E79C"
      codebase="<%=request.getContextPath()%>\Upload.ocx"
      id="bmpUpload"
      name="bmpUpload"
>
</object>




------解决方案--------------------
var FileName = "c:\\test.bmp";

不知道 js 支不支持本地操作,似乎不可以读取IE端的文件