1.

What Is Decodeuri(), Encodeuri() In Javascript?

Answer»

In order to transform the URL into its hexadecimal equivalent the encodeURI() and decodeURI() are used. This is done to send the CHARACTERS that by DEFAULT cannot be SPECIFIED in a URL.

For example, the following code snippet PERFORMS the encoding of URL:

var uri = http://agnlosticajams.weber.com; // original URI
var encodeuri=encodeURI(uri);
document.write("<br />necodeuri”);
var decodeuri = decodeURI(ncodeuri); 
document.write(“<br>/>decodeuri”);

In order to transform the URL into its hexadecimal equivalent the encodeURI() and decodeURI() are used. This is done to send the characters that by default cannot be specified in a URL.

For example, the following code snippet performs the encoding of URL:

var uri = http://agnlosticajams.weber.com; // original URI
var encodeuri=encodeURI(uri);
document.write("<br />necodeuri”);
var decodeuri = decodeURI(ncodeuri); 
document.write(“<br>/>decodeuri”);



Discussion

No Comment Found