用js取url参数来做ajax
Request = {
query : function(name) {
var q = document.location.search.match(new RegExp("[\?\&]" + name
+ "=([^\&]*)(\&?)", "i"));
q = q ? q[1] : q;
if (q != null && q.trim().length == 0)
q = null;
return q;
}
}
我的博客