javascript - How do I use variables in my href when downloading a file? -
javascript
i have 3 variables use define href downloading file:
var fselect; var uselect; var bselect; so href defined variable this:
var savefile = '../files/' + fselect + uselect + bselect + '.x3g'; html
but how use in html document?
<a><img src="../save-button.png" alt="save" width="120" height="40" /></a>
give img tag id attribute (in case, i'm using img)
modify tag using dom
document.getelementbyid("img").src = savefile;
Comments
Post a Comment