定时跳转页面
来源:互联网 发布:演唱会灯光编程 编辑:程序博客网 时间:2024/04/28 12:18
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link href="ueditor/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="ueditor/js/jquery.js"></script>
<script language="javascript">
$(function(){
$('.error').css({'position':'absolute','left':($(window).width()-490)/2});
$(window).resize(function(){
$('.error').css({'position':'absolute','left':($(window).width()-490)/2});
})
});
</script>
<script language="javascript" type="text/javascript">
var timer;
//启动跳转的定时器
function startTimes() {
timer = window.setInterval(showSecondes,1000);
}
var i = 5;
function showSecondes() {
if (i > 0) {
i--;
document.getElementById("secondes").innerHTML = i;
}
else {
window.clearInterval(timer);
location.href = "ueditor/login.jsp";
}
}
//取消跳转
function resetTimer() {
if (timer != null && timer != undefined) {
window.clearInterval(timer);
location.href = "ueditor/login.jsp";
}
}
</script>
</head>
<body style="background:#edf6fa;" onload="startTimes();">
<div class="error">
<div class="reindex"><a href="admin/index.jsp" target="rightFrame">返回首页</a>
<h1 id="error">
遇到错误, <span id="secondes">5</span> 秒后将自动跳转,立即跳转请点击
<a href="javascript:resetTimer();">返回</a>
</h1>
</div>
</div>
</body>
</html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link href="ueditor/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="ueditor/js/jquery.js"></script>
<script language="javascript">
$(function(){
$('.error').css({'position':'absolute','left':($(window).width()-490)/2});
$(window).resize(function(){
$('.error').css({'position':'absolute','left':($(window).width()-490)/2});
})
});
</script>
<script language="javascript" type="text/javascript">
var timer;
//启动跳转的定时器
function startTimes() {
timer = window.setInterval(showSecondes,1000);
}
var i = 5;
function showSecondes() {
if (i > 0) {
i--;
document.getElementById("secondes").innerHTML = i;
}
else {
window.clearInterval(timer);
location.href = "ueditor/login.jsp";
}
}
//取消跳转
function resetTimer() {
if (timer != null && timer != undefined) {
window.clearInterval(timer);
location.href = "ueditor/login.jsp";
}
}
</script>
</head>
<body style="background:#edf6fa;" onload="startTimes();">
<div class="error">
<div class="reindex"><a href="admin/index.jsp" target="rightFrame">返回首页</a>
<h1 id="error">
遇到错误, <span id="secondes">5</span> 秒后将自动跳转,立即跳转请点击
<a href="javascript:resetTimer();">返回</a>
</h1>
</div>
</div>
</body>
</html>
0 0
- js定时页面跳转
- 页面定时跳转
- 实现页面定时跳转
- 页面定时跳转 java
- android 页面定时跳转
- 定时跳转页面
- js定时跳转页面
- 页面定时跳转
- HTML 定时页面跳转
- javascript 定时页面跳转
- 页面定时跳转【JS】
- HTML 定时页面跳转
- HTML页面定时跳转
- JS定时跳转页面
- 前端页面定时跳转
- Jquery实现页面定时跳转
- JavaScript实现定时页面跳转
- 跳转页面及定时处理
- Codeforces Round #307 (Div. 2) C. GukiZ hates Boxes(二分)
- java 8种基本数据类型
- 《Android移动网站开发详解》
- cocos2dx android移植,打包生成apk
- 伟大源于自律
- 定时跳转页面
- OCX控件避免弹出安全警告
- GitLab的两种安装方法
- ocx调试
- 实现无限极分类-递归实现
- Codeforces Round #307 (Div. 2) D. GukiZ and Binary Operations(数学)
- Windows环境下Android Studio v1.0安装教程
- php使用websocket示例详解
- Sublime Text 3 汉化+激活教程