兼容不带参数等情况
function getUrlParam(){
var params = {};
var search = location.search;
search = /\?/.test(search) && search.split("?")[1];
var searchs = /\&/.test(search) ? search.split("&") : [search];
for(var i = 0 ; i < searchs.length ; i++){
if(/\=/.test(searchs[i])){
var item = searchs[i].split("=");
params[item[0]] = item[1];
};
};
return params;
};