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_ //點擊懸浮層網頁按鈕時發生,懸浮層從新顯示爲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;
}
// ]]>
</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>