Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // encodeURI(uri) encodes special characters, except: , / ? : @ & = + $ # (Use encodeURIComponent() to encode these characters).
- var myUrl="my test.asp?name=ståle&car=saab";
- var uriComponent = encodeURIComponent(myUrl);
- console.log(uriComponent );
- var uri = encodeURI(myUrl);
- console.log(uri);
Advertisement
Add Comment
Please, Sign In to add comment