你好像起始页用了iframe是吧?
这样的话,首先获取iframe外面的Ext
var myExt = top.Ext;
var tabs = myExt.getCmp("你的Tabpanel id");//获取TabPanel
给你的“新增用户”添加onclick="javascript:addTab();"来触发下面的这个函数,
这个函数中则进行了添加新页签(且先判断了是否已存在该页签)
function addTab(){
var addUserPanel = tabs.getComponent(“addUser”);
if(!addUserPanel ){//先判断你需要打开的tab页是否已经打开
addUserPanel = new Ext.Panel({
id : “addUser”,
title : “新增用户",
iconCls: 'tabs',
tabTip : "新增用户",
closable : true,
html : "新增用户界面"
});
tabs.add(addUserPanel );
}
tabs.setActiveTab(addUserPanel );
}
在你链接上面添加点击事件,内容如下
tabs.add({//tabs就是你的TabPanel
title: '新增用户',
iconCls: 'tabs',
html: '新增用户界面',
closable:true
}).show();