Answers for "js download file from webserver"

3

javascript download file

$('a#someID').attr({target: '_blank', 
                    href  : 'http://localhost/directory/file.pdf'});
Posted by: Guest on May-12-2020
1

js download file from webserver

<iframe id="download_iframe" style="display:none;"></iframe>
<script>
	document.getElementById('download_iframe').src = "/example/example.txt";
</script>
Posted by: Guest on August-03-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language