Character entities are used to display reserved characters in HTML.
The encodeURI()
function is used to encode a URI.
This function encodes special characters, except: , / ? : @ & = + $ # (Use encodeURIComponent()
to encode these characters).
The decodeURI()
function is used to decode a URI.
The encodeURIComponent()
function encodes a URI component.
This function encodes special characters. In addition, it encodes the following characters: , / ? : @ & = + $ #
The decodeURIComponent()
function decodes a URI component.
The escape()
function encodes a string.
This function makes a string portable, so it can be transmitted across any network to any computer that supports ASCII characters.
This function encodes special characters, with the exception of: * @ - _ + . /
The escape()
function was deprecated in JavaScript version 1.5. Please use encodeURI()
or encodeURIComponent()
instead.
The unescape()
function decodes an encoded string.
The unescape()
function was deprecated in JavaScript version 1.5. Please use decodeURI()
or decodeURIComponent()
instead.
The toLowerCase()
method converts a string to lowercase letters.
Note: The toLowerCase()
method does not change the original string.
The toUpperCase()
method converts a string to uppercase letters.
Note: The toUpperCase()
method does not change the original string.