Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

是否可以设置基本HTML页面以在加载时重定向到另一个页面?

  ask by chobo translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
190 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try using:

(尝试使用:)

<meta http-equiv="refresh" content="0; url=http://example.com/" />

Note: Place it in the head section.

(注意:将其放在头部。)

Additionally for older browsers if you add a quick link in case it doesn't refresh correctly:

(此外,对于较旧的浏览器,如果您添加快速链接,以防它无法正确刷新:)

<p><a href="http://example.com/">Redirect</a></p>

Will appear as

(将显示为)

Redirect

(重定向)

This will still allow you to get to where you're going with an additional click.

(这仍然允许您通过额外点击到达您要去的地方。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...