asp.aspx源代码
<%@ 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_onclick() //点击悬浮层网页按钮时发生,悬浮层重新显示为none
{
    document .getElementById("gbh").style.display="none"; 
}
function Button1_onclick() //点击底层网页按钮时发生:
{
    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" onclick="return Button1_onclick()" />
        <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" onclick="return Button5_onclick()" />
         </div>
    </form>
</body>
</html>
 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号