利用javascript延迟跳转网站

  • A+
所属分类:未分类

最近脑门子发热,购买了几个短域名,买来以后发现暂时也没什么用,但是,放在那也是浪费,就想到了引流到我这个博客来.。有想在短域名上停留几分钟在跳转(方便搜录),在群里问了一下,发现javascript就可以实现延迟跳转网站,做个记录方便以后使用,其实挺简单的。下边三种都可以

<script language="JavaScript">
window.setTimeout("window.location.href='https://www.vjsun.com'", 5000);
</script>

把它放在<body>........</body>任意的一个位子,解释就是在网站停留5秒会自动跳转到vjsun.com这个网站上。

<script language="javascript" type="text/javascript">
setTimeout(function () { this.location.href = "https://www.vjsun.com/243.html" }, 10000);
</script>

在HEAD中添加<meta>标签

<meta http-equiv=”refresh” content=”3;url=’index.php’” >

index.php这里自己修改

weinxin
我的QQ群
这是我的QQ群扫一扫

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: