JS获取URL参数
$(function () {
var action = getUrlParam("action");
alert(action)
});
//根据URL中的参数获取值
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}