asp.aspx源代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 language="javascript" type="text/javascript">
// <!CDATA[
function Button5_ //点击悬浮层网页按钮时发生,悬浮层重新显示为none
{
document .getElementById("gbh").style.display="none";
}
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
// <!CDATA[
function Button5_ //点击悬浮层网页按钮时发生,悬浮层重新显示为none
{
document .getElementById("gbh").style.display="none";
}
function Button1_ //点击底层网页按钮时发生:
{
document .getElementById("gbh").style.display=""; //显示
document .getElementById("gbh").style.zIndex =2000;//这个成下面可以叠放1999层
document .getElementById("gbh").style.position ="absolute";//流式方式叠放
document .getElementById("gbh").style.backgroundColor ="Gray";
document .getElementById("gbh").style.top =0;
document .getElementById("gbh").style.left =0;
document .getElementById("gbh").style.width =screen.availWidth;//宽度为屏幕的宽度
document .getElementById("gbh").style.height =screen.availHeight;
}
{
document .getElementById("gbh").style.display=""; //显示
document .getElementById("gbh").style.zIndex =2000;//这个成下面可以叠放1999层
document .getElementById("gbh").style.position ="absolute";//流式方式叠放
document .getElementById("gbh").style.backgroundColor ="Gray";
document .getElementById("gbh").style.top =0;
document .getElementById("gbh").style.left =0;
document .getElementById("gbh").style.width =screen.availWidth;//宽度为屏幕的宽度
document .getElementById("gbh").style.height =screen.availHeight;
}
// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="gsw" align="center" style="background-color: #00FFFF; text-align: center; height: 301px;">//底层页面层
<input id="Button3" type="button"
value="button" Button1_ />
<br />
</div>
<div id ="gbh" style ="background-color :Gray; height: 157px; filter:alpha(opacity=50); width: 467px; display: none;">//悬浮页面层的显示形式为none,即不显示。
<input id="Button5" type="button" value="button" Button5_ />
</div>
</form>
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="gsw" align="center" style="background-color: #00FFFF; text-align: center; height: 301px;">//底层页面层
<input id="Button3" type="button"
value="button" Button1_ />
<br />
</div>
<div id ="gbh" style ="background-color :Gray; height: 157px; filter:alpha(opacity=50); width: 467px; display: none;">//悬浮页面层的显示形式为none,即不显示。
<input id="Button5" type="button" value="button" Button5_ />
</div>
</form>
</body>
</html>
</html>
本文转自叶子文文博客51CTO博客,原文链接http://blog.51cto.com/leafwf/185843如需转载请自行联系原作者
叶子文文