Answers for "how to save file in folder using javascript"

1

js save files

//javascript
function download(text, name, type) {
  var a = document.getElementById("a");
  var file = new Blob([text], {type: type});
  a.href = URL.createObjectURL(file);
  a.download = name;
}
//html
<a href="" id="a">click here to download your file</a>
<button onclick="download('file text', 'myfilename.txt', 'text/plain')">Create file</button>
Posted by: Guest on March-29-2020
0

how to save file in folder using javascript

C:\xampp\htdocs\form\upload
Posted by: Guest on August-17-2021
0

how to save file in folder using javascript

C:\xampp\htdocs\form\upload\file.txt
Posted by: Guest on August-17-2021

Code answers related to "how to save file in folder using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language