//取url参数
function getQueryString(){
var qs = {};
var url = decodeURIComponent(window.location.href);
//不管有没有伪静态 都看一下?问号后面的参数
if (url.indexOf('?') > -1) {
url = url.substring(url.indexOf('?') + 1);
var prm = url.split('&');
for (var p in prm) {
if (prm[p]) {
var sp = prm[p].split('=');
if (sp.length > 1) {
var spkey = sp[0];
var spvalue = sp[1];
if (spvalue.indexOf('#') > -1) {
spvalue = spvalue.substring(0, spvalue.indexOf('#'));
}
qs[spkey] = spvalue;
}
}
}
}
return qs;
};