<!DOCTYPE html>
<html lang="en-US">
<body>
<img src="/wikimass.png" width="150" height="150">
<br>
<a href="/wikimass.png" download onclick="checkDownload()">click here to download.</a>
<script>
var hyperlink = document.createElement("a");
// Check if user browser does not supports download attribute
function checkDownload(){
if(hyperlink.download === undefined)
alert("Sorry, Your browser doesn't support download attribute");
else
alert("click OK to download the image");
}
</script> </body>
</html>