Ext TabPanel 选项卡混乱问题问题
TabPanel有3个选项卡,每个选项卡都有一个iframe。第一次启动各个选项卡都没问题。但当点击选项卡中的超练接到到其他界面在返回的时候选项卡的内容就发生了变化。不知...
TabPanel有3个选项卡,每个选项卡都有一个iframe 。第一次启动各个选项卡都没问题。但当点击选项卡中的超练接到到其他界面在返回的时候 选项卡的内容就发生了变化。不知道是ext的bug还是自己配置不对啊。
代码如下
超练级界面.htm
<!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>
<title>启动页面</title>
<link rel="stylesheet" type="text/css" href="css_js/resources/css/ext-all.css" />
<script type="text/javascript" src="css_js/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="css_js/ext-all.js"></script>
<script type="text/javascript" src="css_js/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
var tabs = new Ext.TabPanel({
renderTo: 'tabs',
width: 380,
height:350,
frame: true,
activeTab: 0,
defaults: { autoHeight: true },
items: [
{title: '我的客户',html: '<iframe src="HTMLPage1.htm" frameborder="0" width="370" height="350" id="mainpage0"></iframe>'}
,{title: '我的合同',html: '<iframe src="HTMLPage2.htm" frameborder="0" width="370" height="350" id="mainpage1"></iframe>'}
,{title: '我的业务事项',html: '<iframe src="HTMLPage3.htm" frameborder="0" width="370" height="350" id="mainpage2"></iframe>'}
]
});
});
</script>
</head>
<body>
<div id="tabs"></div>
</body>
</html>
---------------------------------------------------------------------------------------------------------------
HTMLPage1.htm
<!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>
<title>无标题页</title>
</head>
<body>
<a href="超练级界面.htm" target="_parent">客户</a>
</body>
</html>
--------------------------------------
HTMLPage2.htm
HTMLPage3.htm 同HTMLPage1.htm一样 将“客户”该为其他文字起到一个区分的作用
超练级界面.htm
<!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>
<title>无标题页</title>
</head>
<body>
<input id="Button1" type="button" value="返回" onclick="window.history.go(-1);"/>
</body>
</html> 展开
代码如下
超练级界面.htm
<!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>
<title>启动页面</title>
<link rel="stylesheet" type="text/css" href="css_js/resources/css/ext-all.css" />
<script type="text/javascript" src="css_js/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="css_js/ext-all.js"></script>
<script type="text/javascript" src="css_js/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
var tabs = new Ext.TabPanel({
renderTo: 'tabs',
width: 380,
height:350,
frame: true,
activeTab: 0,
defaults: { autoHeight: true },
items: [
{title: '我的客户',html: '<iframe src="HTMLPage1.htm" frameborder="0" width="370" height="350" id="mainpage0"></iframe>'}
,{title: '我的合同',html: '<iframe src="HTMLPage2.htm" frameborder="0" width="370" height="350" id="mainpage1"></iframe>'}
,{title: '我的业务事项',html: '<iframe src="HTMLPage3.htm" frameborder="0" width="370" height="350" id="mainpage2"></iframe>'}
]
});
});
</script>
</head>
<body>
<div id="tabs"></div>
</body>
</html>
---------------------------------------------------------------------------------------------------------------
HTMLPage1.htm
<!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>
<title>无标题页</title>
</head>
<body>
<a href="超练级界面.htm" target="_parent">客户</a>
</body>
</html>
--------------------------------------
HTMLPage2.htm
HTMLPage3.htm 同HTMLPage1.htm一样 将“客户”该为其他文字起到一个区分的作用
超练级界面.htm
<!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>
<title>无标题页</title>
</head>
<body>
<input id="Button1" type="button" value="返回" onclick="window.history.go(-1);"/>
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询