English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
JavaScript Global Properties/Function
decodeURI()The decodeURI() function decodes a Uniform Resource Identifier (URI).
Note:UsingencodeURI()The function encodes Uniform Resource Identifiers (URI).
decodeURI(uri)
var uri = "http://example.com/nxm.php?s=шеллы"; var en = encodeURI(uri); var de = decodeURI(en); var ans = "Encoded URI: " + en + "<br>" + "Decoded URI: " + de;
All browsers fully support the encodeURI() function:
Function | |||||
decodeURI() | Is | Is | Is | Is | Is |
Parameter | Description |
---|---|
uri | The URI to be decoded |
Return Value: | A new string representing the decoded version of the encoded URI |
---|---|
Exception Cases: | Thrown when encodeURI contains an invalid character sequenceURIErrorException |
JavaScript Version: | ECMAScript 1 |