1.传递参数 (res.data.throw_id为要传递的参数)
location.href = "end.html?id=" + res.data.throw_id + "";
2.获取参数
var url = location.search; //获取url中"?"符后的字串 ?
var id;
if(url.indexOf("?") != -1) {
str = url.substr(1);
strs = str.split("=");
id = strs[1];
}
console.log("这是获取到的参数" + id)