关于Delphi写的OCX控件的时间触发JSP的事件的问题。(200)

Discussion in 'ActiveX 控件' started by zgc7622, Oct 12, 2010.

  1. zg

    zgc7622 New Member Member

    我在_TLB.pas文件中是这样写的:IFileXEvents = dispinterface ['{A36F4210-1B3E-4195-99C1-BF98B21FAEB6}'] procedure OnError();
    dispid 201;
    end;
    我在JSP中是这样写的:<object classid="clsid:A36F4210-1B3E-4195-99C1-BF98B21FAEB6" id='aaa'> </object><script language= "javascript" for= "aaa" event= "OnError"> { alert("ok");
    }</script>可是总是不能输出OK。不知道这是为什么??
     
  2. xi

    xianjun New Member Member

    这种用法没用过,有没有试试用 aaa.onError = function(){alert("ok");};