Tuesday, June 4, 2013

JavaScript - download a file

If you need to download a file from JavaScript, add this code:
$("<iframe>")
.hide()
.prop("src", $myFileURL)
.appendTo("body");

No comments:

Post a Comment