How to pass variable by reference in javascript? Read data from ActiveX function which returns more than one value

前端 未结 4 1243
野性不改
野性不改 2020-12-19 09:33

I have a ActiveX object which I want to use in the browser (javascript).
There is a function I want to call. Its prototype is:

function TOPOSFiscalPrinte         


        
4条回答
  •  遥遥无期
    2020-12-19 10:25

    There is no support for output parameter in JavaScript. Pack what you want to return in an automation object, assign values to its properties and return it, or if your return value is already occupied, create a class that has properties you can assign to in your ActiveX and add a parameter whose type is the class. In your ActiveX you can use IDispatch/Ex to get/set the properties.

提交回复
热议问题