The decodeURI() function is used to decode a URI.
Eg:
Demo
Eg:
<script>Final code and demo is here
var URL = "https://www.example.com/p/online-html-editor.html?filename=How%20to%20decode%20a%20URL%20in%20JavaScript";
var EncodedURL = decodeURI(URL);
</script>
Demo
No comments:
Post a Comment