Home > front end >  The contents of the HTML JS read computer JSON file
The contents of the HTML JS read computer JSON file

Time:12-09

As title, please use HTML + JS how to read my computer a folder under the json data in a file, and then modify the data

CodePudding user response:

File cannot be directly read, read after upload

CodePudding user response:

JavaScript as HTML scripts are not allowed to read a local file, unless you are using node. Js, using the fs module can read the file

CodePudding user response:

May be associated with service code, can try the url on the connection of the code, you should be able to access, but should pay attention to safety,

CodePudding user response:

Don't change, change the file content to use the node of the fs module
  • Related