From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Functions
The encodeURI() function is used to encode a URI.
This function encodes special characters, with the exception of: , / ? : @ & = + $ # (Use encodeURIComponent() to encode these characters).
Tip: Use the decodeURI() function to decode an encoded URI.
| encodeURI(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)