<%@ 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%>">
<title>My JSP 'wait.jsp' starting page</title>
<!-- 导入jQuery -->
<script type="text/javascript" src="${pageContext.request.contextPath}/jQueryku/jquery-2.1.0.js"></script>
<script type="text/javascript">
//初始化时间
var time = 4;
function returnUrlByTime() {
//每过一秒执行一次
window.setTimeout('returnUrlByTime()', 1000);
time = time - 1;
//获得当前时间赋给time
document.getElementById("layer").innerHTML = time;
//让时间=0是跳转
if(time==0){
location.href="${pageContext.request.contextPath}/login.jsp"
}
}
</script>
</head>
<body οnlοad="returnUrlByTime()">
<h3>注册成功</h3>
<b><span id="layer" style="color: red;">3</span>秒后,转入登录界面。</b>
</html>
三秒钟后跳转
最新推荐文章于 2023-08-01 11:53:59 发布