JavaScript: The Definitive Guide

24.71. decodeURIComponent( ): unescape characters in a URI component

ECMAScript v3

24.71.1. Synopsis

decodeURI(s)

24.71.1.1. Arguments

s

A string that contains an encoded URI component or other text to be decoded.

24.71.1.2. Returns

A copy of s, with any hexadecimal escape sequences replaced with the characters they represent.

24.71.1.3. Throws

URIError

Indicates that one or more of the escape sequences in s is malformed and cannot be correctly decoded.

24.71.2. Description

decodeURIComponent( ) is a global function that returns a decoded copy of its s argument. It reverses the encoding performed by encodeURIComponent( ). See that function's reference page for details.

24.71.3. See Also

decodeURI( ), encodeURI( ), encodeURIComponent( ), escape( ), unescape( )

Категории