From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Functions
The encodeURIComponent() function encodes a URI component.
This function encodes special characters. In addition, it encodes the following characters: , / ? : @ & = + $ #
Tip: Use the decodeURIComponent() function to decode URIs encoded with encodeURIComponent().
| encodeURIComponent(uri) |
| Parameter | Description |
|---|---|
| uri | Required. The URI to be encoded |
ExampleEncode an URI:
The output of the code above will be:
Try it yourself » |
JavaScript Functions
From http://www.w3schools.com (Copyright Refsnes Data)