62,046
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ErrPage.aspx.cs" Inherits="ErrPage" %>
<!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 id="Head1" runat="server">
<title>出错啦.</title>
<style type="text/css">
body{font-size:12px;}
</style>
<script language="JavaScript" type="text/javascript">
var f8=true;
function go()
{
if(!f8) return;f8=false;
t=3;
document.getElementById('view').innerHTML ="<b>"+"4"+"</b>";
window.setInterval("testTime()",1000);
}
function testTime()
{
if(t == 0)
{
f8=true;
location = "Login.aspx";
}
document.getElementById('view').innerHTML = "<b>"+ t +"</b>"; // 显示倒计时
t--;
}
</script>
</head>
<body onload="go()">
<form id="form1" runat="server">
<TABLE height=500 cellSpacing=0 cellPadding=0 width=500 align=center
background="Images/x.gif" border="0" style="border-top-style: dashed; border-right-style: dashed; border-left-style: dashed; border-bottom-style: dashed">
<TBODY>
<TR>
<TD height=330> </TD></TR>
<TR>
<TD vAlign=top>
<DIV align=center>
<strong>您还没有<span style="color: #99ff66">登陆</span>或没有权限<span style="color: #66ff66">访问页面<br />
</span>操作错误!<br />系统将在</strong><asp:Label ID="view" runat="server" ForeColor="Red"></asp:Label><strong>秒后跳转<a href="Login.aspx">首页</a></strong></DIV></TD></TR></TBODY></TABLE>
<div style="text-align:center">
</div>
</form>
</body>
</html>
<script language="javascript" type="text/javascript">
var i=5;
function forward()
{
i--;
if(i>=0)
setTimeout("forward();",1000);
else
document.location.href="要跳转的页面";
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="秒数; URL=转向页面"/>
</head>
<body>
页面内容
</body>
</html>
<script type="text/javascript">
function countDown(secs,surl)
{
if(--secs>0)
{
setTimeout("countDown("+secs+",'"+surl+"')",1000);
}
else
{
location.href=surl;
}
}
</script>
<script type="text/javascript">countDown(5,'要跳的页面');</script>