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