function urlArgs() {
    var args = {};
    var query = location.search.substring(1);
    var pairs = query.split("&");
    for (var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf("=");
        if (pos == -1) {
            continue;
        }
        var name = pairs[i].substring(0, pos);
        console.log(name);
        var value = pairs[i].substring(pos + 1);
        args[name] = value;
    }
    return args;
}

haobuhao
121 声望1 粉丝

web前端,nodejs


引用和评论

0 条评论