<html>
<body>
<p>Click the button to decode a URI after encoding it.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var uri = "https://w3schools.com/my test.asp?name=st%e5le&car=saab";
var uri_enc = encodeURIComponent(uri);
var uri_dec = decodeURIComponent(uri_enc);
var res = "Encoded URI: " + uri_enc + "<br>" + "Decoded URI: " + uri_dec;
document.getElementById("demo").innerHTML = res;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_decodeuricomponent by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:01:29 GMT -->
</html>