html 跳转到新的网址

发布时间 2023-05-09 09:00:27作者: 人间春风意

更新window.location.href后面的值即可

文件名为 index.html

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>页面标题</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
</head>
<body>
    <script>
        window.location.href="https://www.baidu.com/"
    </script>
</body>
</html>