Description
The decodeURI() function is used to decode a URI.
This method has the form:
decodeURI(uri)
Parameter | Description |
---|---|
uri | (required) The URI to be decoded |
Examples
The following example shows the basic use of this method.
<script>
var uri = "ex.com/my test/index.html";
document.write(encodeURI(uri));
document.write("<br />");
document.write(decodeURI(uri));
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|