一个iframe,点击每个tab加载相应的页面进来iframe
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title></title>
<link href="../gstyle/listpage.css" rel="stylesheet" type="text/css" />
<link href="../gstyle/easyui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../javascript/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../javascript/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../javascript/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
$(function () {
//设置自适应高度
$('#tt').height(window.document.documentElement.scrollHeight-40);
$('#tt').tabs({
onSelect: function (title) {
loadHtmlFile(title);
}
});
});
function loadHtmlFile(title) {
switch (title) {
case "A":
{
$("#A").attr("src", "A_Tab.htm");
break;
}
case "B":
{
$("#B").attr("src", "B_Tab.htm");
break;
}
case "C":
{
$("#C").attr("src", "C_Tab.htm");
break;
}
case "D":
{
$("#D").attr("src", "D_Tab.htm");
break;
}
case "E":
{
$("#E").attr("src", "E_Tab.htm");
break;
}
case "F":
{
$("#F").attr("src", "F_Tab.htm");
break;
}
}
}
$(window).resize(function () {
resizeTabs();
});
function resizeTabs() {
$('#tt').tabs('resize');
}
</script>
</head>
<body>
<div class="bodyDiv">
<div id="tt" class="pagetabs">
<div title="A" style="overflow: auto; padding: 0px;">
<iframe id="A" src="" frameborder="0" style="width: 100%; height: 100%"></iframe>
</div>
<div title="B" style="overflow: auto; padding: 0px;">
<iframe id="B" frameborder="0" src="" style="width: 100%; height: 100%;"></iframe>
</div>
<div title="C" style="overflow: auto; padding: 0px;">
<iframe id="C" src="" frameborder="0" style="width: 100%; height: 100%"></iframe>
</div>
<div title="D" style="overflow: auto; padding: 0px;">
<iframe id="D" src="" frameborder="0" style="width: 100%; height: 100%"></iframe>
</div>
<div title="E" style="overflow: auto; padding: 0px;">
<iframe id="E" src="" frameborder="0" style="width: 100%; height: 100%"></iframe>
</div>
<div title="F" style="overflow: auto; padding: 0px;">
<iframe id="F" src="" frameborder="0" style="width: 100%; height: 100%"></iframe>
</div>
</div>
</div>
</body>
</html>
相关推荐
pigsmall 2020-11-19
graseed 2020-10-28
大数据杂谈 2020-09-26
SXIAOYI 2020-09-16
jinhao 2020-09-07
ChinaWin 2020-08-13
mohanzb 2020-08-01
王国平 2020-06-20
yoohsummer 2020-06-01
kangtingting0 2020-05-20
MichelinMessi 2020-02-19
impress 2020-02-20
nicepainkiller 2020-01-25
hfszy0 2013-05-15
lizhenmxcz 2013-05-12
gxyblue 2013-05-11
chenshuixian 2013-06-01
羽化大刀Chrome 2013-05-31
tichangde 2020-01-17