Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

save things javascript

let a = document.createElement('a');
a.href = "data:application/octet-stream,"+encodeURIComponent('"My DATA"');
a.download = 'myFile.json';
a.click(); // we not add 'a' to DOM so no need to remove
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #javascript
ADD COMMENT
Topic
Name
1+4 =