js页面自动跳转实现

下面一段代码是告诉浏览器,过多久就刷新转到新的页面,采用的是页面定时刷新元标识(Meta Refresh Tag)。只能放在HTML代码的<HEAD>区里。
<meta http-equiv="refresh" content="5" url=http://www.google.com"> 


现在做的一个项目用到的跳转:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ include file="../include/const.jsp"%>
<!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>
<title><c:out value="${PAGE_TITLE}" /></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="<%=desp%>">
<meta name="company" content="<%=company%>">
<meta http-equiv="refresh" content="3;url=/index.do">
<!-- Le styles -->
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
.sidebar-nav {
padding: 0;
}
</style>


<link href="/css/bootstrap.css" rel="stylesheet">
</head>
<body>

<%@ include file="../include/header.jsp"%>

<table width="75%" border="0" align="center" cellpadding="3"
cellspacing="1">
<tr>
<td width=30% height=255 align=center><img src="/img/errormsg.jpg" width=155px height=155px border=0 /></td>
<td width=60% height="255" valign="middle" align="center"
style="line-height:25px;">
<div style="color:#777;font-size:14px;line-height:35px;">
<span style="font-weight:bold;color:#ff0000;">出错了!</span><a style="color:#777;" href="<c:out value="${PAGE_GO_URL}"/>">
<span style="color:#ff0000;"><c:out value="${PAGE_MSG}" /></span>
<br>
系统将在3秒钟后自动返回<br>
如果系统没有自动返回,请单击此处自行返回</a> <br>
<a style="color:#666;text-decoration:underline;font-weight:normal;" href="<c:out value="${PAGE_FROM_URL}"/>"><--如果你想继续<c:out
value="${PAGE_TITLE}" />请单击此处</a>
</div> </td>
</tr>
</table>

<%@ include file="../include/footer.jsp"%>

</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值