top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is use for encodeURI() function?

+1 vote
252 views
What is use for encodeURI() function?
posted Aug 7, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The encodeURI() function is used to encode a URI.

This function encodes special characters, except: , / ? : @ & = + $ # (Use encodeURIComponent() to encode these characters).

Example

var uri = "my queryhome.com";
var res = encodeURI(uri);

Output

my%20queryhome.com
answer Aug 9, 2014 by Salil Agrawal
...