EL截取url中参数

function getUrlString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return null;
}

posted @ 2019-05-27 17:06  听风者丶  阅读(213)  评论(0编辑  收藏  举报