/*
source:http://blog.junsangs.com
author:花海
*/
<!-- 随机跳转-->
<script>
function jumpUrl() {
var arr = new Array(
"链接1",
"链接2",
"自行添加链接",
);
window.location.href = arr[Math.floor(Math.random() * arr.length)];
}
setTimeout(function () {
jumpUrl();},6000);//设定跳转时间,1s=1000
</script>
本原创文章未经允许不得转载 | 当前页面:花海博客 » 使用js实现随机跳转到一个网址