jQuery实现倒计时跳转的例子
jQuery实现倒计时跳转的例子
发布时间:2016-12-29 来源:查字典编辑
摘要:实现代码:复制代码代码如下:跳转页面0){$('#num').attr('innerHTML',count);jump(count);}el...

实现代码:

复制代码 代码如下:

<html>

<head>

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

<title>跳转页面</title>

<script src="jquery.js"></script>

<script language="javascript"><;

if(count > 0) {

$('#num').attr('innerHTML', count);

jump(count);

} else {

location.href="http://jb51.net";

}

}, 1000);

}

jump(3);

});

// --></script>

</head>

<body>

<span>欢迎来到jb51.net!</span><br/>jb51.net页面将在3秒后跳转...<br/>还剩<span id="num">3</span>秒

</body>

</html>

可以复制代码并保存到文件中,直接用浏览打开测试效果,注意引入jquery.js文件。

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新asp.net教程学习
热门asp.net教程学习
编程开发子分类