encodeURI Function (JavaScript)

Switch View :
ScriptFree
 Collapse AllExpand All      Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: F# Code: JScript 
encodeURI Function (JavaScript)

Encodes a text string as a valid Uniform Resource Identifier (URI)

encodeURI(URIString)
Remarks

The required URIString argument is a value representing an encoded URI.

The encodeURI function returns an encoded URI. If you pass the result to decodeURI, the original string is returned. The encodeURI function does not encode the following characters: ":", "/", ";", and "?". Use encodeURIComponent to encode these characters.

Applies To: Global Object (JavaScript)

Requirements

Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards. See Version Information.

See Also

Reference