With html5, it is possible now. Set a “download” attr in element.
<a href="http://link/to/file" download="FileName">Download it!</a>
Source : http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download
More Related Contents:
- jQuery append function is just appending the html but not the classes related to it
- How to create a tag with Javascript?
- Are HTML comments inside script tags a best practice? [closed]
- In jQuery, how do I select an element by its name attribute?
- Prevent contenteditable adding on ENTER – Chrome
- input type=file show only button
- Get value of input field inside an iframe
- HTML – attributes vs properties [duplicate]
- Vue.js get selected option on @change
- Understanding Cross-Domain issue in Iframes
- How to change HTML Object element data attribute value in javascript
- Possible to associate label with checkbox without using “for=id”?
- Why does HTML Canvas getImageData() not return the exact same values that were just set?
- How to change a value from JavaScript
- How to determine which html page element has focus? [duplicate]
- Change value of input and submit form in JavaScript
- How to submit a form when the return key is pressed?
- Drawing rotated text on a HTML5 canvas
- How to add bootstrap in angular 6 project? [duplicate]
- Web browser: Hide mouse cursor [duplicate]
- Dynamically created SVG elements are not rendered by the browser
- How to properly unload/destroy a VIDEO element
- Failed to execute ‘pushState’ on ‘History’ error when using window.history.pushState function
- How to hide optgroup/option elements?
- What does this mean: “document.write(‘
- HTML5 Video duration without playing video
- When to access the attribute (vs the property)?
- How to save and edit a file using JavaScript?
- style.backgroundColor is an empty string in JavaScript
- Replacement for deprecated `keypress` DOM event