这是我在一个html里面的内容,现在我想要在点击这个链接,跳转到update.html的同时把这个events变量传递到这个a herf 所在的events/update这个html里面,请问有什么好的办法吗?
直接update?events=events
//我建议你在a标签的点击事件下面写跳转
window.location.href="/events/update?events="+events;
//update接收页面
var events= window.location.href.split("?")[1].split("=")[1];
console.log(decodeURI(events));
在地址栏里传递参数,新页面截取地址栏地址获取参数