学堂 学堂 学堂公众号手机端

html怎么重定向跳转页面

lewis 1年前 (2024-03-09) 阅读数 11 #技术

跳转方法:1、用meta标签,语法“<meta http-equiv="refresh" content="时间; url=跳转地址">”;2、借助js,在script标签中添加“window.location="跳转地址"”代码进行跳转。

本教程操作环境:windows7系统、javascript1.8.5&&HTML5版、Dell G3电脑。

html重定向跳转页面的方法

1、利用meta标签

<head>
<meta http-equiv="refresh" content="5; url=https://www.php.cn/">
</head>

2、借助js

<script type="text/javascript">
	window.location = "http://www.baidu.com";
</script>

推荐教程:《html视频教程》

以上就是html怎么重定向跳转页面的详细内容,更多请关注博信其它相关文章!

版权声明

本文仅代表作者观点,不代表博信信息网立场。

热门