Encodes a text string as a valid Uniform Resource Identifier (URI)
SyntaxencodeURI( URIString )
Examples
The following code first encodes and then decodes a URI.
var uriEncode = encodeURI ("http://www.Not a URL.com");
var uriDecode = decodeURIComponent(uriEncode);
document.write(uriEncode);
document.write("<br/>");
document.write(uriDecode);
Remarks
The required URIString argument is a value representing an encoded URI.
The encodeURI function returns an encoded URI. If you pass the result to decodeURI , the original string is returned. The encodeURI function does not encode the following characters: ":", "/", ";", and "?". Use encodeURIComponent to encode these characters.
See also Other articles AttributionsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4