<html >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
function showNo()
{
document.getElementById("doing").style.display="none";
document.getElementById("divLogin").style.display="none";
}
function showFloat()
{
var range = getRange();
document.getElementById("doing").style.width=range.width+"px";
document.getElementById("doing").style.height = range.height+"px";
document.getElementById("doing").style.display="block";
document.getElementById("divLogin").style.display="";
}
function getRange()
{
var top = document.body.scrollTop;
var left = document.body.scrollLeft;
var height = document.body.scrollHeight;
var width = document.body.scrollWidth;
if(top ==0 && left==0 && height==0 && width==0)
{
top = document.documentElement.scrollTop;
left = document.documentElement.scrollLeft;
height = document.documentElement.clientHiehgt;
width = document.documentElement.clientWidth;
}
return {top:top,left:left,height:height,width:width};
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="lblUser" runat="server"></asp:Label>
<a href="javascript:void(0)" id="hrefa" onclick="showFloat()">登录</a>
<br />
测试内容<br />
<br />
网站内容
<div id="doing" style="filter:alpha(opacity=50);-moz-opacity:0.3;opacity:0.3;background-color:#000;width:100%;height:100%;z-index:1000;position: absolute;left:0;top:0;display:none;overflow: hidden;">
</div>
<div id="divLogin" style="border:solid 10px #898989; background:#fff; padding:10px; width:780px; z-index:1001; position:absolute; display:none;top:84%; left:43%; margin:-200px 0 0 -400px;">
<div style="padding:3px 15px 3px 15px; text-align:left; vertical-align:middle;">
<div>用户:<asp:TextBox ID="username" runat="server" Width="141px"></asp:TextBox></div>
<div>密码:<asp:TextBox ID="txtpwd" runat="server" TextMode="Password" ></asp:TextBox></div>
<br />
<div>
<asp:Button ID="btnLogin" Text="登录" runat="server" OnClick="btnLogin_Click" /> <input id="btnCancel" type="button" onclick="showNo()" value="取消" />
</div>
</div>
</div>
</form>
</body>
</html>
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
function showNo()
{
document.getElementById("doing").style.display="none";
document.getElementById("divLogin").style.display="none";
}
function showFloat()
{
var range = getRange();
document.getElementById("doing").style.width=range.width+"px";
document.getElementById("doing").style.height = range.height+"px";
document.getElementById("doing").style.display="block";
document.getElementById("divLogin").style.display="";
}
function getRange()
{
var top = document.body.scrollTop;
var left = document.body.scrollLeft;
var height = document.body.scrollHeight;
var width = document.body.scrollWidth;
if(top ==0 && left==0 && height==0 && width==0)
{
top = document.documentElement.scrollTop;
left = document.documentElement.scrollLeft;
height = document.documentElement.clientHiehgt;
width = document.documentElement.clientWidth;
}
return {top:top,left:left,height:height,width:width};
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="lblUser" runat="server"></asp:Label>
<a href="javascript:void(0)" id="hrefa" onclick="showFloat()">登录</a>
<br />
测试内容<br />
<br />
网站内容
<div id="doing" style="filter:alpha(opacity=50);-moz-opacity:0.3;opacity:0.3;background-color:#000;width:100%;height:100%;z-index:1000;position: absolute;left:0;top:0;display:none;overflow: hidden;">
</div>
<div id="divLogin" style="border:solid 10px #898989; background:#fff; padding:10px; width:780px; z-index:1001; position:absolute; display:none;top:84%; left:43%; margin:-200px 0 0 -400px;">
<div style="padding:3px 15px 3px 15px; text-align:left; vertical-align:middle;">
<div>用户:<asp:TextBox ID="username" runat="server" Width="141px"></asp:TextBox></div>
<div>密码:<asp:TextBox ID="txtpwd" runat="server" TextMode="Password" ></asp:TextBox></div>
<br />
<div>
<asp:Button ID="btnLogin" Text="登录" runat="server" OnClick="btnLogin_Click" /> <input id="btnCancel" type="button" onclick="showNo()" value="取消" />
</div>
</div>
</div>
</form>
</body>
</html>