Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
142 views
in Technique[技术] by (71.8m points)

html - 从HTML页面重定向(Redirect from an HTML page)

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

  ask by chobo translate from so

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

1 Reply

0 votes
by (71.8m points)

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...