<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 = "my%20testffd4.html?name=st%e5le&car=saab";
var enc = encodeURI(uri);
var dec = decodeURI(enc);
var res = "Encoded URI: " + enc + "<br>" + "Decoded URI: " + dec;
document.getElementById("demo").innerHTML = res;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_decodeuri by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:01:29 GMT -->
</html>