- 在父页面跳转:
window.location.href="xxx.html";
- 在新窗口打开,即使用_target属性:
window.open("xxx.html","_blank");
- JS页面锚点定位
document.getElementById("xxx").scrollIntoView();
window.location.href="xxx.html";
window.open("xxx.html","_blank");
document.getElementById("xxx").scrollIntoView();