17607924619 发表于 2019-2-25 13:46:00

求助

<!DOCTYPE html>
<html>
            <head>
                     <title>
                           三秒跳转网址
                     <title>
                     <meta http-equiv="refresg"
                        content="3;url=http://www.baidu.com"/>
            </head>
            <body>
            </body>
<html>

为什么跳转不了百度页面

不二如是 发表于 2019-2-25 16:36:03

本帖最后由 不二如是 于 2019-2-25 16:38 编辑

1、title 元素标签写法错误(最后一个缺少"/"):
<title>三秒跳转网址<title>

正确:
<title>三秒跳转网址</title>

2、meta 元素实现跳转,需要设置
(meta学习:传送门)

鱼油:
         <meta http-equiv="refresg"
                  content="3;url=http://www.baidu.com"/>
            </head>

每 3 秒刷新一下浏览器并跳转到指定页面。

写错了“refresg”,content 属性中的跳转目标不需要写“url=”

正确:
<!DOCTYPE html>
<html>
<head>
    <title>三秒跳转网址</title>
    <meta http-equiv="refresh" content="3;http://www.baidu.com">
</head>
<body>
</body>
<html>
页: [1]
查看完整版本: 求助