let url = "https://mbd.baidu.com/newspage/data/landingsuper?context=哈哈&n_type=0&p_from=1"; let arr =url.substr(url.indexOf("?")+1).split("&"); console.log(arr) let obj = {} for (let i= 0;i<arr.length;i++) { let arri = arr[i].split("=") console.log(arr[i]) obj[arri[0]] = arri[1] } console.log(obj)