Alternative for the ActiveX object for the other browsers excluding IE?

前端 未结 2 680
陌清茗
陌清茗 2021-01-19 17:02

Can anyone help me as i am stuck in creating a file(temporary) with extension(say .csv) in the local disk, i tried using ActiveX object but it works fine only in internet ex

2条回答
  •  爱一瞬间的悲伤
    2021-01-19 17:23

    The problem you have is that browser implementations of ECMAScript (JavaScript) don't allow you to write to the clients' disk. Microsoft reverse-engineered JavaScript, and dubbed it JScript. Though the base is the same, MS added those ActiveX objects, and a compiler (JScript can be compiled, yes).

    In short, JScript can be used for more than just browser tasks, so MS provided ActiveX objects to enable some form of I/O. The only thing you can do on browsers other than IE, is using HTML5's new DOM Storage objects. Teemu provided a link to the documentation for that

提交回复
热议问题