detach element.download HTML5 -


in order make possible download file can used html5 api:

document.getelementbyid("btn-generate").href = url; document.getelementbyid("btn-generate").download = filename; 

i want make option file not downloadable need detach download property. trying using

document.getelementbyid("btn-generate").href = null; document.getelementbyid("btn-generate").download = null; 

but not working expected... knows how can done?

try removing attribute instead of property

document.getelementbyid("btn-generate").removeattribute('download'); 

or both safe.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -