What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-27 22:25:20
javascript download string as file
function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; ... Add solution -
Javascript 2022-03-05 13:00:02
javascript download file
function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; ... Add solution -
Javascript 2021-09-21 12:25:04
download file in jquery
function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; ... Add solution -
Javascript 2021-08-27 19:18:02
Dynamically download different filetypes in JavaScript
function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; ... Add solution
Best helpers
Simon LANG
+5
Ryo Hirai
+5
Sqlsourcerer
+5
Pierus
+5
Ken N.
+5
Rene Duchamp
+5
Susette87
+5
Tanveer Ali
+5
Andrew Besag
+5
Derek Kaplan
+5
Littleprince
+5
Bridget W.
+5
Haidy Kassem
+5
Ferhat Turan
+5
Jwp36
+5