msg

<% @ Page language = " c# "  Codebehind = " message.aspx.cs "  AutoEventWireup = " false "  Inherits = " WebUI.message "   %>
< html >
    
< head >
        
< title > message of yejie.com </ title >
    
</ head >
    
< body >
        
< form id = " Form1 "  method = " post "  runat = " server " >
            
< table height = " 200px " >
                
< tr >
                    
< td ></ td >
                
</ tr >
            
</ table >
            
<!--< table align = center width = 700  border = " 0 "  cellspacing = " 1 "  cellpadding = " 0 "  bgcolor = LightGrey   >
           
             
< tr >
               
               
< td align = center  bgcolor = white height = 200px >   < div id = " OpResult " ></ div >
                      
< br >
                      
< font color = " #FF6600 "  style = " font-size:18px  " >< script src = " js/message.js " ></ script ></ font >
                      
< a href = ' javascript:void(0); '  onclick = " back(); " >< font color = " #FF6600 "  style = " font-size:12px  " > 立即返回 </ font ></ a ></ td >
             
</ tr >
           
           
</ table >-->
            
< table align = " center "  width = " 700 "  border = " 0 "  cellspacing = " 1 "  cellpadding = " 0 " >
                
< tr >
                    
< td >
                        
< Script > function window.onload(){btnOk.focus();} </ Script >
                        
< br >
                        
& nbsp; & nbsp; < fieldset style = ' width:550; ' >
                            
< legend style = ' font-size:12px; color:#D3631B; ' >
                                
< strong > 成功提示 </ strong ></ legend >
                            
< table width = ' 100% '  border = ' 0 '  height = ' 50 '  cellpadding = ' 6 '  cellspacing = ' 5 ' >
                                
< tr >
                                    
< td width = ' 74% '  align = ' left '  style = ' font-size:12px;color:#5A6A73; line-height:20px ' >
                                        
<!--     恭喜!注册成功! < br > 发送一封注册邮件到您的邮箱[email protected],请注意查收! -->
                                        
< div id = " OpResult " ></ div >
                                        
< script src = " Js/message.js " ></ script >
                                        
< br >
                                        
< br >
                                        
< center >< button id = ' btnOk '  onClick = " back(); " >< img src = ' Images/btnOk.gif '  style = ' margin-top:3px ' >& nbsp;确定 </ button ></ center >
                                    
</ td >
                                    
< td width = ' 26% '  align = ' center ' >< img src = ' Images/ok.gif '  border = ' 0 ' ></ td >
                                
</ tr >
                            
</ table >
                        
</ fieldset >
                    
</ td >
                
</ tr >
            
</ table >
        
</ form >
    
</ body >
</ html >
using  System;
using  System.Collections;
using  System.ComponentModel;
using  System.Data;
using  System.Drawing;
using  System.Web;
using  System.Web.SessionState;
using  System.Web.UI;
using  System.Web.UI.WebControls;
using  System.Web.UI.HtmlControls;

namespace  WebUI
{
    
///   <summary>
    
///  message 的摘要说明。
    
///   </summary>
     public   class  message : System.Web.UI.Page
    {
        
private   void  Page_Load( object  sender, System.EventArgs e)
        {
            
//  在此处放置用户代码以初始化页面
             string  message  =  ( string )Request.QueryString[ " ms " ];
            
            
string  url  =  ( string )Request.QueryString[ " url " ];
            
if (message  !=   null )
            {
                Response.Write(
" <script>message='<font style=\ " font - size:12px\ " > " + message + " </font>';</script> " );
            }
            
if (url  !=   null )
            {
                Response.Write(
" <script>url=' " + url + " ';</script> " );
            }
        }

        
#region  Web 窗体设计器生成的代码
        
override   protected   void  OnInit(EventArgs e)
        {
            
//
            
//  CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
            
//
            InitializeComponent();
            
base .OnInit(e);
        }
        
        
///   <summary>
        
///  设计器支持所需的方法 - 不要使用代码编辑器修改
        
///  此方法的内容。
        
///   </summary>
         private   void  InitializeComponent()
        {    
            
this .Load  +=   new  System.EventHandler( this .Page_Load);
        }
        
#endregion
    }
}

        var times 
=   10 ;
        var timeId;
        function goBack()
        {
            
try
            {
                self.location
=  url;
            }
            
catch (e)
            {
                window.location
= ' default.aspx ' ;
            }
        }
        function OpResult()
        {
         
try
         {
            times
-- ;
            
if (times  <   1 )
            {
                goBack();
                
return ;
            }
            document.getElementById(
" OpResult " ).innerHTML  =  message  +   " ,<font color=#ff0000> " + times + " </font><font style=\ " font - size:12px\ " >秒后自动返回</font> " ;
            timeId 
=  setTimeout(OpResult,  1000 ); 
            }
         
catch (e)
         {
            
if (times  <   1 )
            {
                goBack();
                
return ;
            }
            document.getElementById(
" OpResult " ).innerHTML  =   " <font style=\ " font - size:12px\ " >未知消息</font>;<font color=#ff0000> " + times + " </font><font style=\ " font - size:12px\ " >秒后自动返回</font> " ;
            timeId 
=  setTimeout(OpResult,  1000 ); 
         }
        }
        function back()
        {
            times 
=   0 ;
        }
        OpResult();

你可能感兴趣的:(msg)