Currently I have an <a>
tag which has already declared download attribute, like this:
<a href="123.png" download >Download it!</a>
Which the tag above, I can download the image from an url when clicking on the link. Now I have a button on my page, like this :
<button>Download by using button!</button>
Is there any way to let the user download not by clicking on the link but by clicking on the button instead.
My purpose is just for making an auto code that can download all the image with a specified class on a html page.