Is it possible to load a file with JS/HTML5 FileReader on non served page?

后端 未结 3 1753
轻奢々
轻奢々 2020-12-16 19:27

I want to create a simple game in HTML5/JS and I don\'t want the user to run any webserver or to have to connect to a website. (just an HTML page)

But it looks like

3条回答
  •  借酒劲吻你
    2020-12-16 19:31

    I believe that this is your answer: How to open a local disk file with Javascript?

    In short, you are looking something like this:

    
    

    HTML5 allows you to load files which are stored locally on computer, but you cannot select it. User must select file which he/she wants to be loaded.

    Just imagine what would happen when developers (or better spoken, hackers) would have access to everyones local data...

提交回复
热议问题