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>
- 4 回答
- 0 关注
- 425 浏览
添加回答
举报
0/150
提交
取消