generate .txt from JS?

yotube
0

Issue

Just a quick question:

Is there a possibility to capture via JS the information from a prompt or form to a file, for example .txt? And thus save on the hard disk the information generated by my page through the information entered by the user.

It is for a scoreboard of a board game.

If this is not possible... is there any other option? I had thought that maybe I could print screen and save image by means of a JS event.

Thank you very much!


Solution

You have two options here:

  1. Create a file and then ask the user to download it
  2. Use File System Access API to save the file

How to create a file or even better



Answered By - Konrad Linkowski

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top