Working with “Out” Parameters in JavaScript

后端 未结 3 1837
星月不相逢
星月不相逢 2020-12-11 03:08

I am working with an ActiveX control in Internet Explorer 8 that is to display a save file dialog which let\'s the user choose a file name and file type (jpg, gif, etc). Th

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 03:20

    Unfortunately, out/ByRef parameters will only work in JScript for objects; not for any other type (numbers, strings).

    In this case, you’ll have to use VBScript, which does support ByRef arguments, or like maerics says, write a VB/VBScript wrapper for the SaveFileDialog method, which could return an object containing both file name and type.

提交回复
热议问题