Created
January 17, 2021 09:54
-
-
Save thisbit/0e1ae1bfa1ae1fef163042e7112e8b4a to your computer and use it in GitHub Desktop.
copy current url link
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
<!doctype html> | |
<html> | |
<head> | |
<script> | |
function Copy() { | |
var Url = document.getElementById("url"); | |
Url.innerHTML = window.location.href; | |
console.log(Url.innerHTML) | |
Url.select(); | |
document.execCommand("copy"); | |
} | |
</script> | |
</head> | |
<body> | |
<div> | |
<input type="button" value="Copy Url" onclick="Copy();" /> | |
<br /> Paste: <textarea id="url" rows="1" cols="30"></textarea> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment