jquery how get the page by value

jquery how get the page by value

function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }

Want to get the URL pass over the ID, you can call

 var id = getUrlParam('id');

So that you can get a link to a jump pass over the ID

Guess you like

Origin blog.csdn.net/wwj791859814/article/details/78273918