HTML代码实现页面自动跳转 | 立即跳转到另一个页面
要实现在打开页面后马上跳转到另一个页面,可以使用以下HTML代码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='refresh' content='0;url=https://www.example.com'>
</head>
<body>
</body>
</html>
在上面的代码中,<meta>标签的http-equiv属性设置为'refresh',content属性设置为'0;url=https://www.example.com',表示页面在加载后立即刷新并跳转到指定的URL。其中,0表示延时时间为0秒,即立即刷新,'https://www.example.com'是要跳转的目标页面的URL。
原文地址: https://www.cveoy.top/t/topic/pgMk 著作权归作者所有。请勿转载和采集!