<%@ Page Language="C#" AutoEventWireup="true" CodeFile="chuangkou.aspx.cs" Inherits="chuangkou" %> <!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"><!-- a{ color:#000; font-size:12px; text-decoration:none; } a:hover{ color:#900; text-decoration:underline; } #massage_box{ position:absolute; left:400px; top:100px; width:350px; height:200px; filter:dropshadow(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden; } #mask{ position:absolute; top:0; left:0; width:10px; height:10px; background:#FFF; filter:ALPHA(opacity=60); z-index:1; visibility:hidden; } .massage{border:#036 solid; border-width:1 1 3 1; width:95%; height:95%; background:#fff; color:#036; font-size:12px; line-height:150%} .header{background:#036; height:10%; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3 5 0 5; color:#fff} .style1 { color: #FF0000; } --></style><style type="text/css" mce_bogus="1"> a{ color:#000; font-size:12px; text-decoration:none; } a:hover{ color:#900; text-decoration:underline; } #massage_box{ position:absolute; left:400px; top:100px; width:350px; height:200px; filter:dropshadow(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden; } #mask{ position:absolute; top:0; left:0; width:10px; height:10px; background:#FFF; filter:ALPHA(opacity=60); z-index:1; visibility:hidden; } .massage{border:#036 solid; border-width:1 1 3 1; width:95%; height:95%; background:#fff; color:#036; font-size:12px; line-height:150%} .header{background:#036; height:10%; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3 5 0 5; color:#fff} .style1 { color: #FF0000; } </style> <mce:style type="text/css" mce_bogus="1"><!-- a{ color:#000; font-size:12px; text-decoration:none; } a:hover{ color:#900; text-decoration:underline; } #massage_box{ position:absolute; left:400px; top:100px; width:350px; height:100px; filter:dropshadow(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden; } #mask{ position:absolute; top:0; left:0; width:10px; height:10px; background:#FFF; filter:ALPHA(opacity=60); z-index:1; visibility:hidden; } .massage{border:#036 solid; border-width:1 1 3 1; width:95%; height:95%; background:#fff; color:#036; font-size:12px; line-height:150%} .header{background:#036; height:10%; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3 5 0 5; color:#fff} .style1 { color: #FF0000; } --></mce:style><style type="text/css" mce_bogus="1" mce_bogus="1"> a{ color:#000; font-size:12px; text-decoration:none; } a:hover{ color:#900; text-decoration:underline; } #massage_box{ position:absolute; left:400px; top:100px; width:350px; height:100px; filter:dropshadow(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden; } #mask{ position:absolute; top:0; left:0; width:10px; height:10px; background:#FFF; filter:ALPHA(opacity=60); z-index:1; visibility:hidden; } .massage{border:#036 solid; border-width:1 1 3 1; width:95%; height:95%; background:#fff; color:#036; font-size:12px; line-height:150%} .header{background:#036; height:10%; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3 5 0 5; color:#fff} .style1 { color: #FF0000; } </style> <!--实现层移动--> <mce:script type="text/javascript"><!-- var Obj='' document.οnmοuseup=MUp document.οnmοusemοve=MMove // function MDown(Object){ // Obj=Object.id // document.all(Obj).setCapture() // pX=event.x-document.all(Obj).style.pixelLeft; // pY=event.y-document.all(Obj).style.pixelTop; // } // // function MMove(){ // if(Obj!=''){ // document.all(Obj).style.left=event.x-pX; // document.all(Obj).style.top=event.y-pY; // } // } // // function MUp(){ // if(Obj!=''){ // document.all(Obj).releaseCapture(); // Obj=''; // } // } function d_x(){ mask.style.visibility='visible'; massage_box.style.visibility='visible' } function d_y(){ massage_box.style.visibility='hidden'; mask.style.visibility='hidden' } function checkNum() { var amt=document.all("TextBox1").value; //alert(amt); if(amt=="") { d_x() } else if(amt=="1") { location.href="Default2.aspx"; } } // --></mce:script> </head> <body> <form id="form1" runat="server"> <div id="massage_box"> <div class="massage"> <%-- <div class="header" οnmοusedοwn=MDown(massage_box)> --%> <div class="header"> <div style="display:inline; width:150px; position:absolute">System message</div> <span onClick="javascript:d_y();" style="float:right; display:inline; cursor:hand" mce_style="float:right; display:inline; cursor:hand">Close</span> </div> <ul style="margin-right:20px" mce_style="margin-right:20px"> <%-- 用户名:<asp:TextBox ID="TextBox1" runat="server" Width="120px"></asp:TextBox> <span class="style1">*</span><br /><br /> 密 码:<asp:TextBox ID="TextBox2" TextMode="Password" runat="server" Width="120px"></asp:TextBox> <span class="style1">*</span><br /><br /> <asp:Button ID="Button1" runat="server" Text="登录" οnclick="Button1_Click" /> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/login.aspx">还没注册?</asp:HyperLink><br /--%> <span style=" font-size :14px" mce_style=" font-size :14px"> Please check the money amout!Check the format! </span> </br> </br> <span onClick="javascript:d_y();" style=" padding-left:100px; display:inline; cursor:hand" mce_style="float:right; display:inline; cursor:hand"><asp:Button ID="Button1" runat="server" Text="OK" Width="50px" /> </span> </ul> </div> </div> <div id="mask" onClick="javascript:d_y();"></div> <%--<span onClick="javascript:d_x();" style="cursor:hand" mce_style="cursor:hand"> --%> <span onClick="checkNum()" style="cursor:hand" mce_style="cursor:hand"> <asp:Label ID="Label2" runat="server" Text="clickMe"></asp:Label> </span> <asp:Label ID="Label1" runat="server" Text=""></asp:Label> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </form> </body> </html> 点击弹出一个层!