function getUrlParam(k) {
var regExp = new RegExp('([?]|&)' + k + '=([^&]*)(&|$)');
var result = window.location.href.match(regExp);
if (result) {
return decodeURIComponent(result[2]);
} else {
return null;
}
}
var regExp = new RegExp('([?]|&)' + k + '=([^&]*)(&|$)');
var result = window.location.href.match(regExp);
if (result) {
return decodeURIComponent(result[2]);
} else {
return null;
}
转载于:https://www.cnblogs.com/shiapi/p/9187630.html