Created
October 29, 2021 08:53
-
-
Save ktkr3d/30d5d2101688434a7c809c110743bb48 to your computer and use it in GitHub Desktop.
Encode / Decode URI
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> | |
<title></title> | |
</head> | |
<body> | |
<form name="f01"> | |
<div> | |
<textarea name="ta01" rows="3" placeholder="Input encoded URI!" style="width:60%"></textarea> | |
<input type="button" value="decodeURI" onclick="document.f01.ta02.value=decodeURI(document.f01.ta01.value)" /> | |
<input type="button" id="btn02" value="copy" /> | |
<script type="text/javascript"> | |
document.f01.btn02.addEventListener("click", function(event) { | |
event.preventDefault(); | |
document.f01.ta01.select(); | |
document.execCommand("copy"); | |
}); | |
</script> | |
</div> | |
<div> | |
<textarea name="ta02" rows="3" placeholder="Input decoded URI!" style="width:60%;"></textarea> | |
<input type="button" value="encodeURI" onclick="document.f01.ta01.value=encodeURI(document.f01.ta02.value)" /> | |
<input type="button" id="btn04" value="copy" /> | |
<script type="text/javascript"> | |
document.f01.btn04.addEventListener("click", function(event) { | |
event.preventDefault(); | |
document.f01.ta02.select(); | |
document.execCommand("copy"); | |
}); | |
</script> | |
</div> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment