获取浏览器参数

location.find = function(name){
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)', "ig").exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null;
};
location.find(xx)

你可能感兴趣的:(获取浏览器参数)