获取浏览器参数
2016-10-17 本文已影响0人
一个小小实习生
location.find = function(name){
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)', "ig").exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null;
};
location.find(xx)