简体   繁体   中英

Saving Form data to file

I want make a simple HTML application with a form. I want to be able to save the data to a file and also read it.

It will be an application that is just for offline use (me and 1 other person will use it). But since I won't be the only one using it I want to be able to share the data with the other person.

So using local storage is not an option. That data cannot be saved, and I don't accidently want to lose that data. I also tried using blobs, but that only offers download option and it downloads to your download folder. I would like to save the file to the location of the HTML file.

Is that possible with plain HTML and JS? Or do I need to look into some other technologies?

Thanks in advance!

Browser javascript don't have access to the file system and so it won't allow to create file in the local directory. if you want to achieve such functionality you should try sending the file to backend like node js and write the file to the directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM