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

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -