I want to create buttons such that each button downloads an image in the page with different sizes . Here is my image:
<img src="src" alt="no image" id="QRImage" />
And these are my buttons :
<a onclick="Download(1)" href="javascript:;" >
<i class="fa fa-download"></i> Little
</a>
<a onclick="Download(2)" href="javascript:;" >
<i class="fa fa-download"></i> Medium
</a>
<a onclick="Download(3)" href="javascript:;">
<i class="fa fa-download"></i> Large
</a>
All i want to do is write a function that takes parameter and download the image according to this parameter without changing the image which is shown in the html. Thanks a lot for any help.