<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Msg.aspx.cs" Inherits="Web.Common.Msg" %>

<!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 runat="server">
    <title></title>
    <script type="text/javascript">
        
        function delayURL(url) {
            var delay = document.getElementById("time").innerHTML;
            //最后的innerHTML不能丢，否则delay为一个对象  
            if (delay > 0) {
                delay--;
                document.getElementById("time").innerHTML = delay;
            } else {
                window.top.location.href = url;
                return;
            }
            setTimeout("delayURL('" + url + "')", 1000);//此处1000毫秒即每一秒跳转一次
        }
    </script>
    <style type="text/css">
        #msg { line-height:25px;border:1px solid #0072d3; background-color: #c1e3ff; margin-right: auto; margin-left: auto; width: 500px;padding:10px;font-family:'Microsoft YaHei'; }
        
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div id="msg">
            <%if (t == "1")
              { %>
            <%=msg%><br />
            <span id="time">3</span>秒钟之后自动跳转，如果不跳转，请点击下面链接 <a href="<%=TargetUrl %>">点击返回</a>
            <script type="text/javascript">
                delayURL("<%=TargetUrl %>");  
            </script>
            <%}
              else
              {%><%=msg%>，<a href="#" onclick="history.go(-1);return false;">点击后退</a><br />
            <%} %>
        </div>
    </form>
</body>
</html>
