一开始tab我直接用href引用,结果发现各种id冲突。
google一番之后,采用iframe方式,就可以解决这种问题。
function addTab(title, href){
var tt = $('#center_tab');
if (tt.tabs('exists', title)){//如果tab已经存在,则选中并刷新该tab
tt.tabs('select', title);
refreshTab({tabTitle:title,url:href});
} else {
if (href){
var content = '<iframe scrolling="no" frameborder="0" src="'+href+'" style="width:100%;height:100%;"></iframe>';
} else {
var content = '未实现';
}
tt.tabs('add',{
title:title,
closable:true,
content:content,
});
}
}
function refreshTab(cfg){
v