Access local files from HTML5 Desktop Application in html folder

前端 未结 2 1298
醉话见心
醉话见心 2021-01-12 15:21

HTML5 is great and I can replace my existing desktop application with it, but just a little security restriction prevents me to complete my job. I plan to create a simple de

2条回答
  •  梦谈多话
    2021-01-12 15:54

    If you need that file so much, why not just load it dynamically inside a JS script as a json object.

    So, in other words, put the contents of the file into a js script, and strucutre the file contents into JSON format, then load that script on load or when you require it.

    Alternately if you need file IO use localstorage.

提交回复
热议问题