EncodeURIComponent/decodeURIComponent

From NSB App Studio
Revision as of 14:15, 24 July 2019 by Ghenne (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

encodeURIComponent(URI)

decodeURIComponent(URI)

Description

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.

Example

// Encode a URI:
var uri = "http://w3schools.com/my test.asp?name=ståle&car=saab";
Print("Encoded URI: " & encodeURIComponent(uri));

' Encode a URI:
uri = "http://w3schools.com/my test.asp?name=ståle&car=saab"
Print "Encoded URI: " & encodeURIComponent(uri)

The result will be:

Encoded URI: http%3A%2F%2Fw3schools.com%2Fmy%20test.asp%3Fname%3Dst%C3%A5le%26car%3Dsaab

Related Items

escape, unescape, encodeURI, decodeURI