encodeURI

encodeURI

Description

encodeURI(string uri)

Parameters

Name Description Type Default Optional
uri string No

Examples

Example #1 – encodeURI example
var uri = encodeURI('http://example.com/{"foo": ["bar"]}'); console.log(uri); // http://example.com/%7B%22foo%22:%20%5B%22bar%22%5D%7D

See also

External references