/**
* 采用正则表达式获取地址栏的参数
* @param url 传入的url地址
* @param name 传入的参数名
*
*/
function getUrlParam(url, name){
var reg = new RegExp("[?&]" + name + "\=([^&]+)","g")
var matcher = reg.exec(url)
var items = null
if(null != matcher){
try {
items = decodeURIComponent(decodeURIComponent(matcher[1]));
} catch (e) {
try {
items = decodeURIComponent(matcher[1]);
} catch (e) {
items = matcher[1];
}
}
}
return items
}