404跳转页面5秒倒计时页面跳转
来源:互联网 发布:矩阵式大灯 编辑:程序博客网 时间:2024/05/16 04:58
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>jquery和JavaScript404跳转页面5秒倒计时页面跳转</title><meta name="description" content="jQuery和JavaScript两个版本的404跳转页面效果,利用倒计时间控制页面在规定多少秒时间内,页面跳转到指定的页面跳转过程。" /><style type="text/css">html{background:url(images/paper.jpg)!important;}a,fieldset,img{border:0;}a{color:#221919;text-decoration:none;outline:none;}a:hover{color:#3366cc;text-decoration:underline;}body{font-size:24px;color:#B7AEB4;}body a.link,body h1,body p{-webkit-transition:opacity 0.5s ease-in-out;-moz-transition:opacity 0.5s ease-in-out;transition:opacity 0.5s ease-in-out;}#wrapper{text-align:center;margin:100px auto;width:594px;}a.link{text-shadow:0px 1px 2px white;font-weight:600;color:#3366cc;opacity:0;}h1{text-shadow:0px 1px 2px white;font-size:24px;opacity:0;}img{-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out;height:202px;width:199px;opacity:0;}p{text-shadow:0px 1px 2px white;font-weight:normal;font-weight:200;opacity:0;}.fade{opacity:1;}@media only screen and (min-device-width:320px) and (max-device-width:480px){#wrapper{margin:40px auto;text-align:center;width:280px;}}</style><strong><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script></strong><!--解决 IE6 背景缓存--><!--[if IE 6]><script type="text/javascript">document.execCommand("BackgroundImageCache", false, true);</script><![endif]--><script type="text/javascript">$(document).ready(function(){if (!$.browser.msie){$("img").addClass('fade').<strong>delay(800)</strong>.queue(function(next){$("h1, p").addClass("fade");$("a.link").css("opacity", 1);next();});}else{$("img, h1, p").addClass('fade');$('a.link').css('opacity', 1);}});</script></head><body> <div id="wrapper"> <a href="http://www.baidu.com"><img src="images/404_icon.png"></a> <div> <h1>唉呀!</h1> <p>你正在寻找的页面无法找到。<a style="color:#ff6600;" href="http://www.17sucai.com/">可能在这里!</a></p> <a class="link" href="/" onclick="history.go(-1)"><span id="sec">5</span> 秒后返回首页</a><br /><br /><br /> </div> </div><script type="text/javascript">$(function () { setTimeout("lazyGo();", 1000); //在一秒之后执行lozyG0()这函数});function lazyGo() {var sec = $("#sec").text();$("#sec").text(--sec); //text()设置或返回被选元素的文本内容。if (sec > 0)setTimeout("lazyGo();", 1000);elsewindow.location.href = "http://www.baidu.com";}</script></body></html>
</pre><pre>
注意:测试效果的时候要链接 jquery-1.4.2.min.js
相关知识讲解:
setTimeout("lazyGo();", 1000); //在一秒之后执行lozyG0()这函数
text()设置或返回被选元素的文本内容。
delay() 方法对队列中的下一项的执行设置延迟。
queue() 方法显示或操作在匹配元素上执行的函数队列
<addClass() 方法向被选元素添加一个或多个类
css() 方法设置或返回被选元素的一个或多个样式属性。
next() 获得匹配元素集合中每个元素紧邻的同胞元素。如果提供选择器,则取回匹配该选择器的下一个同胞元素。
css3属性:opacity :设置 div 元素的不透明级别 ,默认为1
0 0
- 404跳转页面5秒倒计时页面跳转
- 3秒倒计时跳转页面
- 页面5秒后跳转
- 5秒后跳转页面?
- 倒计时跳转页面
- 倒计时页面跳转
- 页面跳转倒计时
- js倒计时跳转 页面
- 倒计时自动跳转页面
- jsp倒计时 页面跳转
- 倒计时页面自动跳转
- 页面倒计时跳转
- 倒计时跳转页面
- 倒计时-自动跳转页面
- 妙趣横生:倒计时跳转页面
- Android 倒计时跳转页面
- js几秒以后倒计时跳转到另一个页面
- js制作404错误页面5秒钟倒计时自动跳转
- JavaScript权威指南_74_第9章_类和模块_9.4-类的扩充
- Matlab Intro - Image Filter
- android应用程序的混淆打包(转)
- runtime 运行时机制说明
- Linux系列:Ubuntu虚拟机设置固定IP上网(配置IP、网关、DNS、防止resolv.conf被重写)
- 404跳转页面5秒倒计时页面跳转
- PowerDesigner中,修改column的name和Code同步问题
- JavaScript权威指南_75_第9章_类和模块_9.5-类和类型
- 互联网协议入门(二)
- URL珍藏
- java读取配置文件的几种方法
- CheckBox控件返回"true,false"的问题
- Android-Universal-Image-Loader 图片异步加载类库的使用(超详细配置)
- (1.2.5)树和二叉树的结构定义