Last active
April 5, 2021 08:43
-
-
Save arn-ob/9d27651a37cb168e97ec575343bb7b64 to your computer and use it in GitHub Desktop.
Download Image from Source URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
</head> | |
<!-- http://localhost:5500/ --> | |
<!-- https://www.flightexpert.com/img/dow/ramadancalender.jpg --> | |
<body> | |
<a id="link" download></a> | |
<script> | |
$(document).ready(function () { | |
var a = $("<a>") | |
.attr("href", "ramadancalender.jpg") | |
.attr("download", "ramadancalender.jpg") | |
.appendTo("body"); | |
a[0].click(); | |
a.remove(); | |
window.close() | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment