How to handle an ActiveX event in Javascript

后端 未结 7 1394
半阙折子戏
半阙折子戏 2020-11-28 07:58

This is somewhat of a follow-up to an answer here.

I have a custom ActiveX control that is raising an event (\"ReceiveMessage\" with a \"msg\" parameter) that needs

7条回答
  •  孤街浪徒
    2020-11-28 08:53

    If you have an ActiveX element on your page that has an id of 'MyControl' then your javascript handler syntax is this:

    function MyControl::ReceiveMessage(msg)
    {
       alert(msg);
    }
    

提交回复
热议问题