📌  相关文章
📜  javascript 重定向到另一个页面 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:11.661000             🧑  作者: Mango

代码示例6
// similar behavior as an HTTP redirect
window.location.replace("https://www.hrefcode.com");

// similar behavior as clicking on a link
window.location.href = "https://www.hrefcode.com";