HTML网页自动跳转的方法

分类:计算机 | 前端 | 综合 1414
更新:2020-03-21 21:14:17
编辑

说明

介绍如何在HTML网页文件中添加一个网址,然后双击该文件就可以在浏览器中跳转到该网址。

方法一

<html>
<head>
<meta http-equiv="Content-Language" content="zh-CN">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="refresh" content="0.1;url=http://www.cehui3s.com">
<title></title>
</head>
<body>
</body>
</html>

在url中输入需要跳转的网址即可。

方法二

<html><head><title>正在跳转</title></head>
<body>
<script language='javascript'>document.location = 'http://www.cehui3s.com'</script>
</body>
</html>