How to output local files with js

this is the case. I want to make a table on the web page, and then generate a json file where the web page file is located. There are more blob,base64 methods on the Internet, but they are all downloaded through the browser after clicking. I would like to ask if there is a direct export method? Can ajax do this

Mar.14,2021

No, because js cannot read or write local files for security reasons.


if it is a web application, you cannot directly use js to output local files (the program specifies the storage location and does not require user intervention). If you are in the program, in the development of local applications such as electron, you can use js to output local files.
in the web application, you can output the file, and then simulate it as a download, let the customer click to download the data, and let the customer specify the storage location.


the problem description of the landlord looks very painful. Do I have dyslexia?

if the landlord is asking whether the front end can directly generate the download file?
the answer is yes, such as this: https://github.com/rainabba/j.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e51ab0-65768.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e51ab0-65768.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?