使用方法:
将下面的代码合理运用到自己的网页中,将代码中的地址修改为自己的即可,还可以修改跳转时间,代码中都有备注修改方法。
代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF8">
<meta name="viewport" content="width=devicewidth, initialscale=1.0">
<title>JS实现自动跳转网址</title>
<script>
function autoRedirect() {
setTimeout(function() {
window.location.href = "https://www.aayuanma.cn"; // 将此处的网址替换为你想要跳转的网址
}, 5000);//5000代表5秒后跳转
}
</script>
</head>
<body onload="autoRedirect()">
<h1>AA源码网-跳转页面</h1>
<p>页面将在5秒后跳转</p>
</body>
</html>
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容