Ext TabPanel 选项卡混乱问题问题

TabPanel有4个选项卡,每个选项卡都有一个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>'}
                ,{title: '我的项目',html: '<iframe src="HTMLPage4.htm" frameborder="0" width="370" height="350" id="mainpage3"></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

<!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>
---------------------------------------------------------------------------------------------------------

HTMLPage3.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>

--------------------------------------------------------------------------------------------------------

HTMLPage4.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>

-----------------------------------------------------------------------------------------------------

超练级界面.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>

HUH函数
浏览 426回答 4
4回答

GCT1015

变化是什么样的情况?注意window.history.go(-1);返回的是上上个页面,改成window.history.back();试试

SMILET

window.history.back(),这个先不考虑。选项卡混乱的问题怎么搞定啊

精慕HU

我按你的做,怎么没有那样问题
打开App,查看更多内容
随时随地看视频慕课网APP