查看: 171|回复: 0

[文章教程] JS监听事件跳转

[复制链接]
xuanxiao 发表于 2023-2-28 18:50:49 | 显示全部楼层 |阅读模式
  1. const all = [...document.querySelectorAll(".aside-action---mcrK")].filter(item => item.getAttribute('href'));
  2.   all.forEach(item => {
  3.     item.addEventListener('click', (event) => {
  4.       location.href = item.textContent === '健康度' ? `/builder/mcn/health?id=${new Date().getTime()}` : item.getAttribute('href');
  5.     })
  6.   })
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号