convert path string to url encoding javascript
var myOtherUrl =
"http://example.com/index.html?url=" + encodeURIComponent(myUrl);
convert path string to url encoding javascript
var myOtherUrl =
"http://example.com/index.html?url=" + encodeURIComponent(myUrl);
convert path string to url encoding javascript
const uri = 'https://mozilla.org/?x=шеллы';
const encoded = encodeURI(uri);
console.log(encoded);
// expected output: "https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B"
try {
console.log(decodeURI(encoded));
// expected output: "https://mozilla.org/?x=шеллы"
} catch (e) { // catches a malformed URI
console.error(e);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us