<!DOCTYPE html>
<html>
<head>
<title>网页跳转示例</title>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="5; url=https://www.example.com">
</head>
<body>
<p>您将在5秒后被重定向到<a href="https://www.example.com">example.com</a></p>
</body>
</html>
<meta http-equiv="refresh" content="5; url=https://www.example.com">
:
https://www.example.com
)。content="5; url=https://www.example.com"
表示等待5秒后跳转到 https://www.example.com
。<p>
标签内的内容:
如果你需要更复杂的跳转逻辑(例如通过JavaScript实现),可以使用以下代码:
<!DOCTYPE html>
<html>
<head>
<title>网页跳转示例</title>
<meta charset="UTF-8">
<script type="text/javascript">
window.location.href = "https://www.example.com";
</script>
</head>
<body>
<p>正在跳转到<a href="https://www.example.com">example.com</a></p>
</body>
</html>
window.location.href = "https://www.example.com";
:https://www.example.com
)。上一篇:html图片标签
下一篇:html元素
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站