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

求教高手:关于ASP调用OCX中函数的问题,谢谢
代码如下:
——————————————————————————————
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<meta   name= "GENERATOR "   content= "Microsoft   FrontPage   4.0 ">
<meta   name= "ProgId "   content= "FrontPage.Editor.Document ">
<title> New   Page   1 </title>
<SCRIPT   ID=clientEventHandlersJS   LANGUAGE=javascript>
<!--
function   submit1_onclick()   {
   
    var   obj   =   document.getElementById( "ADO_Activex1 ");
    var   aa   =   obj.MsgBox();//MsgBox是类ReadWrite中的一个函数,返回CString值
    alert(aa);
}
//-->
</SCRIPT>
</head>
<body>
<p>
<table   width=80%   border=1   align=center>
    <tr   height=404> <td>
        <object   classid= "clsid:BD5EDA69-6774-4278-9081-DE3B6D027548 "     id= "ADO_Activex1 "   width= "455 "   height= "431 ">
          <param   name= "_Version "   value= "65536 ">
          <param   name= "_ExtentX "   value= "12039 ">
          <param   name= "_ExtentY "   value= "11404 ">
          <param   name= "_StockProps "   value= "0 ">
        </object>
          </td>
          <td   align= "center ">
              <input   id=submit1   type= "submit "     width= "69 "   height= "21 "   border= "0 "   LANGUAGE=javascript   onclick= "return   submit1_onclick() ">
        </td>
    </tr>
</table>
</p>
</body>
</html>
————————————————————————————————————
但是它到var   aa   =   obj.MsgBox();出错:
              错误:对象不支持此属性或方法

谢谢,分不多了   =   =

------解决方案--------------------
function submit1_onclick() {
var aa = ADO_Activex1.MsgBox();//MsgBox是类ReadWrite中的一个函数,返回CString值
alert(aa);
}
直接这样试试看.

------解决方案--------------------
不懂,路过帮忙顶