相关文章推荐
伤情的创口贴  ·  CASE (Transact-SQL) - ...·  1 年前    · 
爱笑的脸盆  ·  使用 Python 读取 ...·  1 年前    · 
谈吐大方的香菜  ·  centOS 8 pm2: command ...·  1 年前    · 
function funcUrlDel(name){
    var loca = window.location;
    var baseUrl = loca.origin + loca.pathname + "?";
    var query = loca.href.split('?')[1]
    if (query.indexOf(name)>-1) {
        var obj = {}
        var arr = query.split("&");
        for (var i = 0; i < arr.length; i++) {
            arr[i] = arr[i].split("=");
            obj[arr[i][0]] = arr[i][1];
        delete obj[name];
        var url = baseUrl + JSON.stringify(obj).replace(/[\"\{\}]/g,"").replace(/\:/g,"=").replace(/\,/g,"&");
        console.log(url,'urlurlurlurl')
        return url