decodeURI() (Function)

This ECMA defined function can be used to decode an entire URI value that was encoded with the encodeURI() function.


ECMAScript edition - 3
JavaScript - 1.5
JScript - 5.5
Internet Explorer - 5.5
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-decodeURI(anEncodedURI)
Argument list:anEncodedURIA previously encoded URI

This function is the complement of the encodeURI() function that we describe elsewhere.

A string that might have been encoded with the encodeURI() function either locally or remotely, can be converted back to a normal URI string with this function.

As far as ECMAScript is concerned, this supersedes the unescape() function, which is flagged as deprecated functionality in the JScript 5.5 documentation.

Note that the hash character (#) is not decoded.

See also:decodeURIComponent(), encodeURI(), encodeURIComponent(), escape(), unescape(), URI handling functions


ECMA 262 edition 3 - section -