function getCookie(name) {//获取name为
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg)) {
return decodeURI(arr[2]);
} else {
return null;
}
}
function hasQueryString(name) {
var reg = new RegExp("(^|&)" + name);
var r = window.location.search.substr(1).match(reg);
if (r) {
return true
}
return false
}