As its name indicates, Javascript encodeURI function is used to encodes the string value into world wide acceptable format.
The encodeURI function does not consider special characters like , ? : / @ + = $ # to convert but convert all other characters with ASCII code of the original character preceded by % symbol.
Javascript encodeURI function accept string parameter and return corresponding encoded string value.
Syntax