1. 程式人生 > >URL轉碼問題

URL轉碼問題

let url = window.location.search.split('&');
let iso = url[0].split('=')[1];
let name = decodeURI(url[1].split('=')[1]);   ---decodeURL()解碼  encodeURI()編碼
console.log(name)