A页面

在A页面跳转到B页面的时候,在url后面可以拼接参数 例如:

window.location.href = './B.html?' + id;

跳转到B页面之后,可以通过url地址获取到从A页面传递过来的id

const thisProjectId = parseInt(location.href.split('?')[1]);

这样就可以把上个页面传过来的id给获取到

相关文章:

  • 2021-06-19
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2021-10-03
  • 2021-10-26
  • 2021-11-08
相关资源
相似解决方案