Created
April 12, 2017 21:17
-
-
Save ReneHollander/9a351e0eadc0cb91078683c655ad86fe to your computer and use it in GitHub Desktop.
This file contains 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
<html> | |
<head> | |
<script language="javascript" type="text/javascript"> | |
function setAmount(amount) { | |
document.getElementById("amount").setAttribute('value', amount) | |
} | |
function openDonation() { | |
window.open("https://www.paypal.me/dominicboeck/" + document.getElementById("amount").getAttribute('value'), "_blank"); | |
} | |
</script> | |
</head> | |
<body> | |
<button type="button" onclick="setAmount(5)">5€</button> | |
<button type="button" onclick="setAmount(10)">10€</button> | |
<button type="button" onclick="setAmount(25)">25€</button> | |
<br> | |
<input id="amount" type="number" value="10"></input> | |
<button type="button" onclick="openDonation()">DONATE</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment