0 Try like below:
- $('a').click(function(e) {
- e.preventDefault();
- window.location.href = 'test.txt';
- });
-
- <a href="no-script.html">Download now!</a>
If you want to download any file through jQuery, please follow below link:
https://stackoverflow.com/questions/3749231/download-file-using-javascript-jquery
http://jqueryfiledownload.apphb.com/