JavaScript encodeURI()
JavaScript encodeURI()
The encodeURI() global method is used for encoding a URI. Its opposite is decodeURI() global method.
Some letters that are skipped by encodeURI() are , / ? : @ & = + $ * #
Syntax:-
Its syntax is:- encodeURI(uri)
Return:-
Its return is:- a string of encoded URI
Further Explanation:-
Parameter | Description |
uri | Required. The URI to encode. |