decodeURIComponent() (Function)

This ECMA defined function can be used to decode a URI component value that was encoded with the encodeURIComponent() 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:-decodeURIComponent(anEncodedComponent)
Argument list:anEncodedComponentA previously encoded component

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

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

This enhances the encode/decode facilities of the compliant browser over and above what used to be available with escape()/unescape() functions.

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


ECMA 262 edition 3 - section -