101 lines
3.7 KiB
Plaintext
101 lines
3.7 KiB
Plaintext
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="PopupForm4.Master.cs"
|
|
Inherits="Education.PopupForm2" %>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head runat="server">
|
|
<title></title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta http-equiv="Page-Enter" content="blendTrans(duration=0.1)" />
|
|
<meta http-equiv="Page-Exit" content="blendTrans(duration=0.1)" />
|
|
<meta http-equiv="cache-control" content="no-cache" />
|
|
<meta http-equiv="pragma" content="no-cache" />
|
|
<meta http-equiv="expires" content="0" />
|
|
<asp:ContentPlaceHolder ID="head" runat="server">
|
|
</asp:ContentPlaceHolder>
|
|
</head>
|
|
<body style="overflow: hidden;">
|
|
<form id="form1" runat="server">
|
|
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
|
|
<div class="background">
|
|
<div id="headerDiv" style="height: 34px; padding: 3px; box-sizing: border-box; background-color: white;">
|
|
<div style="float: right;">
|
|
</div>
|
|
</div>
|
|
<div id="bodyDiv" class="body" style="height: 5000px; text-align: left; padding: 0;
|
|
overflow: hidden; border: 0; background-color: white;">
|
|
<div id="bodyContentDiv" style="width: 100%; height: 100%; overflow-x: auto; overflow-y: auto;"
|
|
onscroll="SetDivPosition(this)">
|
|
<div style="clear: both; padding: 3px 5px 0 5px;">
|
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
|
|
<ContentTemplate>
|
|
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
|
|
</asp:ContentPlaceHolder>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<script type="text/javascript">
|
|
// 調整各 DIV 位置及大小
|
|
function windowResize() {
|
|
// 偵測瀏覽器 client area 的高度
|
|
var cliWidth = 0, cliHeight = 0;
|
|
if (typeof (window.innerWidth) == 'number') {
|
|
//Non-IE
|
|
cliWidth = window.innerWidth;
|
|
cliHeight = window.innerHeight;
|
|
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
|
//IE 6+ in 'standards compliant mode'
|
|
cliWidth = document.documentElement.clientWidth;
|
|
cliHeight = document.documentElement.clientHeight;
|
|
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
|
//IE 4 compatible
|
|
cliWidth = document.body.clientWidth;
|
|
cliHeight = document.body.clientHeight;
|
|
}
|
|
|
|
var headerDiv = document.getElementById("headerDiv");
|
|
var bodyDiv = document.getElementById("bodyDiv");
|
|
var bodyContentDiv = document.getElementById("bodyContentDiv");
|
|
var bodyHeight = cliHeight - headerDiv.clientHeight;
|
|
|
|
if (bodyHeight > 0) {
|
|
bodyDiv.style.height = bodyHeight + "px";
|
|
bodyContentDiv.style.maxHeight = bodyHeight + "px";
|
|
}
|
|
else
|
|
bodyDiv.style.height = 0;
|
|
}
|
|
|
|
function windowOnLoad() {
|
|
window.resizeTo(screen.width, screen.height);
|
|
windowResize();
|
|
RestoreDivPosition();
|
|
window.focus();
|
|
}
|
|
|
|
function SetDivPosition(obj) {
|
|
var intY = obj.scrollTop;
|
|
document.cookie = "yPos=!~" + intY + "~!";
|
|
}
|
|
|
|
function RestoreDivPosition() {
|
|
var strCook = document.cookie;
|
|
if (strCook.indexOf("!~") != 0) {
|
|
var intS = strCook.indexOf("!~");
|
|
var intE = strCook.indexOf("~!");
|
|
var strPos = strCook.substring(intS + 2, intE);
|
|
document.getElementById("bodyContentDiv").scrollTop = strPos;
|
|
}
|
|
}
|
|
|
|
window.onload = windowOnLoad;
|
|
window.onresize = windowResize;
|
|
</script>
|
|
</body>
|
|
</html>
|