62,025
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="center.aspx.cs" Inherits="DHM_center" %>
<!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>
<style type="text/css">
.top
{
background-color: #FFFFFF;
width: 100%;
height: 100%;
}
.top .a1
{
float: left;
width: 100%;
height: 100%;
background-color: White;
}
.top .a1 .b1
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b2
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b3
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b4
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
</style>
<script type="text/javascript">
//iframe高度自适应
function IFrameReSize(iframename) {
var pTar = document.getElementById(iframename);
if (pTar) { //ff
if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight) {
pTar.height = pTar.contentDocument.body.offsetHeight;
} //ie
else if (pTar.Document && pTar.Document.body.scrollHeight) {
pTar.height = pTar.Document.body.scrollHeight;
}
}
}
//iframe宽度自适应
function IFrameReSizeWidth(iframename) {
var pTar = document.getElementById(iframename);
if (pTar) { //ff
if (pTar.contentDocument && pTar.contentDocument.body.offsetWidth) {
pTar.width = pTar.contentDocument.body.offsetWidth;
} //ie
else if (pTar.Document && pTar.Document.body.scrollWidth) {
pTar.width = pTar.Document.body.scrollWidth;
}
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="top">
<div class="a1">
<div class="b1">
<iframe id="if_left_top" scrolling="no" frameborder="0" height="100%" src='<%=url1%>' width="100%" onload='IFrameReSize("if_left_top");IFrameReSizeWidth("if_left_top");' ></iframe>
</div>
<div class="b2">
<iframe id="if_right_top" scrolling="no" frameborder="0" height="100%" src="<%=url2%>" width="100%" onload='IFrameReSize("if_right_top");IFrameReSizeWidth("if_right_top");' ></iframe>
</div>
<div class="b3">
<iframe id="if_left_bottom" scrolling="no" frameborder="0" height="100%" src="<%=url3%>" width="100%" onload='IFrameReSize("if_left_bottom");IFrameReSizeWidth("if_left_bottom");' ></iframe>
</div>
<div class="b4">
<iframe id="if_right_bottom" scrolling="no" frameborder="0" height="100%" src="<%=url4%>" width="100%" onload='IFrameReSize("if_right_bottom");IFrameReSizeWidth("if_right_bottom");'></iframe>
</div>
</div>
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="DHM_test" %>
<!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 id="Head1" runat="server">
<title>多画面显示</title>
<style type="text/css">
html, body, form
{
height: 100%;
}
.top
{
background-color: #FFFFFF;
width: 100%;
height: 100%;
}
.top .a1
{
float: left;
width: 100%;
height: 50%;
background-color: White;
}
.top .a1 .b1
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b2
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b3
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b4
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="top">
<div class="a1">
<div class="b1">
<iframe id="if_left_top" scrolling="no" frameborder="0" height="50%" src="http://www.baidu.com"
width="100%"></iframe>
</div>
<div class="b2">
<iframe id="if_right_top" scrolling="no" frameborder="0" height="50%" src="http://www.baidu.com"
width="100%"></iframe>
</div>
<div class="b3">
<iframe id="if_left_bottom" scrolling="no" frameborder="0" height="50%" src="http://www.baidu.com"
width="100%"></iframe>
</div>
<div class="b4">
<iframe id="if_right_bottom" scrolling="no" frameborder="0" height="50%" src="http://www.baidu.com"
width="100%"></iframe>
</div>
</div>
</div>
</form>
</body>
</html>
<%@ Page Language="C#" %>
<!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 id="Head1" runat="server">
<title>多画面显示</title>
<style type="text/css">
html, body, form
{
height: 100%;
}
.top
{
background-color: #FFFFFF;
width: 100%;
height: 100%;
}
.top .a1
{
float: left;
width: 100%;
height: 100%;
background-color: White;
}
.top .a1 .b1
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b2
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b3
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
.top .a1 .b4
{
background-color: white;
float: left;
width: 50%;
height: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="top">
<div class="a1">
<div class="b1">
<iframe id="if_left_top" scrolling="no" frameborder="0" height="100%" src='Default10.aspx'
width="100%"></iframe>
</div>
<div class="b2">
<iframe id="if_right_top" scrolling="no" frameborder="0" height="100%" src="Default10.aspx"
width="100%"></iframe>
</div>
<div class="b3">
<iframe id="if_left_bottom" scrolling="no" frameborder="0" height="100%" src="Default10.aspx"
width="100%"></iframe>
</div>
<div class="b4">
<iframe id="if_right_bottom" scrolling="no" frameborder="0" height="100%" src="Default10.aspx"
width="100%"></iframe>
</div>
</div>
</div>
</form>
</body>
</html>