For a school homework I've created an html5 file. I am trying to track mouse position on that file. The code for the mouse position is taken from here: javascript get x and y coordinates on mouse click. I would like to log output data onto a text file or a csv file on my computer instead of printing them out. How can I do that?
Asked
Active
Viewed 272 times
1
-
You can't, HTML is not allowed to write files on the computer running it. Your options are to log in a localStorage, or in memory and put on the page a link to export this memory as a downloadable file. Then you click the link and let your browser save it. – kumesana Aug 22 '19 at 15:38