index.html和detall.html在同级目录,以下代码在PC调试可以跳转,嵌入之后却失效了,难道要window.location.href = url;吗
window.location.href = url;
index.js
var url = 'detall.html'; location.href = url;
没做测试,不过你可以在 a 标签上走一下。然后拿到绝对路径。
1.2m questions
2.1m answers
5 comments
56.5k users