页面定时跳转(收集整理)
2016-03-10 15:54
148 查看
<!doctype html <head> <meta charset=utf-8" /> <title>js定时跳转页面的方法</title> </head> <body> <script> var t=10;//设定跳转的时间 setInterval("refer()",1000); //启动1秒定时 function refer(){ if(t==0){ location="http://www.baidu.com"; //#设定跳转的链接地址 } document.getElementById('show').innerHTML=""+t+"秒后跳转到百度"; // 显示倒计时 t--; // 计数器递减 } </script> <span id="show"></span> </body>
相关文章推荐
- Spring声明式事务配置管理方法
- 数据结构与算法Javascript描述(二)队列
- Qt中常用的类
- Jedis连接池配置
- CentOS6.5配置python开发环境之一:CentOS图形化界面显示
- laravel安装
- 服务器端Go程序对长短链接的处理及运行参数的保存
- 服务器部署MVC API 遇到IIS 403.14 错误
- 【网络流24题】太空飞行计划问题
- MediaPlayer获取实例的方法
- [数论-欧拉函数的应用]NEFU 1115
- JAVA常量
- 对软件工程这门课的疑问
- 【python】gevent学习
- CSS基础选择器
- Xshell 服务器文件传输
- PAT (Basic Level)1045. 快速排序
- ARM和NEON指令
- 学习进度条01
- Java实现AES加密,异常java.security.InvalidKeyException: Illegal key size 的解决