Home | Top | Free Ajax Editor | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.


encodeURIComponent Method

 

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

encodeURIComponent( encodedURIString )

The required encodedURIString argument is a value representing an encoded URI component.

Remarks

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.

Home | Top | Free Ajax Editor | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.