一个open div

    技术2022-05-12  4

    <%@ Page language="c#" Codebehind="Open_Div.aspx.cs" AutoEventWireup="false" Inherits="test.Open_Div" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML> <HEAD> <title>-</title> <mce:style type="text/css"><!-- BODY { MARGIN: 0px } #Loading { BORDER-RIGHT: #cccccc 3px solid; BORDER-TOP: #cccccc 3px solid; Z-INDEX: 10; BACKGROUND: #ffffff; LEFT: 10px; BORDER-LEFT: #cccccc 3px solid; WIDTH: 10px; BORDER-BOTTOM: #cccccc 3px solid; POSITION: absolute; TOP: 10px; HEIGHT: 10px } --></mce:style><style type="text/css" mce_bogus="1"> BODY { MARGIN: 0px } #Loading { BORDER-RIGHT: #cccccc 3px solid; BORDER-TOP: #cccccc 3px solid; Z-INDEX: 10; BACKGROUND: #ffffff; LEFT: 10px; BORDER-LEFT: #cccccc 3px solid; WIDTH: 10px; BORDER-BOTTOM: #cccccc 3px solid; POSITION: absolute; TOP: 10px; HEIGHT: 10px } </style> <mce:script LANGUAGE="JavaScript"><!-- function $(){return document.getElementById?document.getElementById(arguments[0]):eval(arguments[0]);} var OverH,OverW,ChangeDesc,ChangeH=50,ChangeW=50; function OpenDiv(_Dw,_Dh,_Desc) { $("Loading").innerHTML=""; OverH=_Dh;OverW=_Dw;ChangeDesc=_Desc; $("Loading").style.display=''; if(_Dw>_Dh){ChangeH=Math.ceil((_Dh-10)/((_Dw-10)/50))}else if(_Dw<_Dh){ChangeW=Math.ceil((_Dw-10)/((_Dh-10)/50))} $("Loading").style.top=(document.documentElement.clientHeight-10)/2+"px"; $("Loading").style.left=(document.documentElement.clientWidth-10)/2+"px"; OpenNow() } var Nw=10,Nh=10; function OpenNow() { if (Nw>OverW-ChangeW)ChangeW=2; if (Nh>OverH-ChangeH)ChangeH=2; Nw=Nw+ChangeW;Nh=Nh+ChangeH; if(OverW>Nw||OverH>Nh) { if(OverW>Nw) { $("Loading").style.width=Nw+"px"; $("Loading").style.left=(document.documentElement.clientWidth-Nw)/2+"px"; } if(OverH>Nh) { $("Loading").style.height=Nh+"px"; $("Loading").style.top=(document.documentElement.clientHeight-Nh)/2+"px" } window.setTimeout("OpenNow()",10) }else{ Nw=10;Nh=10;ChangeH=50;ChangeW=50; $("Loading").innerHTML=ChangeDesc; } } // --></mce:script> </HEAD> <body> <form runat="server"> <div id="Loading" style="DISPLAY:none;line-height:50px;" mce_style="DISPLAY:none;line-height:50px;" onlclick="this.style.display='none'">页面返回中。。。</div> <P> <asp:TextBox ID="TextBox1" Runat="server">测试</asp:TextBox> </P> <P> </P> <P> <asp:Button id="Button1" runat="server" Text="Button"></asp:Button></P> <mce:script language="javascript"><!-- var mstr = window.location.search; OpenDiv(300,50,mstr); var str = mstr.replace("?",""); var list = str.split("&"); var arr = list[1].split("="); window.setTimeout("window.location.href=/""+arr[1]+"/"",2000); // --></mce:script> </form> </body> </HTML>


    最新回复(0)