路径携带参数:
url:".......?str="+str;
//取参数的方法
var request = {
QueryString: function (val) {
var reg = new RegExp("(^|&)" + val + "=([^&]*)(&|$)");
var result = window.location.search.substr(1).match(reg);
return result ? decodeURIComponent(result[2]) : null;
}
};
取值:
var type=request.QueryString("str")