EncodeURI/decodeURI

From NSB App Studio
Revision as of 14:14, 24 July 2019 by Ghenne (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

encodeURI(URI)

decodeURI(URI)

Description

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.

Example

// Encode a URI:
var uri = "my test.asp?name=ståle&car=saab";
NSB.Print(encodeURI(uri));

' Encode a URI:
uri = "my test.asp?name=ståle&car=saab"
Print encodeURI(uri)
</pre>

The result will be:

my%20test.asp?name=st%C3%A5le&car=saab

Related Items

escape, unescape, encodeURIComponent, decodeURIComponent