📌  相关文章
📜  jquery 获取搜索参数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:23.633000             🧑  作者: Mango

代码示例1
$.urlParam = function (name) {
    var results = new RegExp('[\?&]' + name + '=([^&#]*)')
                      .exec(window.location.search);

    return (results !== null) ? results[1] || 0 : false;
}

console.log($.urlParam('action')); //edit