Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

encodeURIComponent Method

Returns as string encoded as a valid component of a Uniform Resource Identifier (URI).

function encodeURIComponent(encodedURIString : String) : String

Required. A string representing an encoded URI component.

The encodeURIComponent method returns an encoded URI. If you pass the result to decodeURIComponent, the original string is returned. Because the encodeURIComponent method encodes all characters, be careful if the string represents a path such as /folder1/folder2/default.html. The slash characters will be encoded and will not be valid if sent as a request to a Web server. Use the encodeURI method if the string contains more than a single URI component.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.