跪求easyui 打开新页面添加一个新选项卡

2025-02-25 14:21:49
推荐回答(2个)
回答1:

function addTab(){
$('#tt').tabs('add',{
title:'New Tab ' ,
content:'Tab Body ' ,
iconCls:'icon-save',
closable:true,
tools:[{
// iconCls:'icon-mini-refresh',
handler:function(){
alert('add');
}
}]
});
}

回答2:

其实跟你点击功能菜单是一样的,既然新闻资讯你都可以添加了,添加按钮还不是一样
function tianjia(title, url, icon) {
if (!$("#tabs").tabs('exists', title)) {
var allTabs = $("#tabs").tabs("tabs");
$("#tabs").tabs('add', {
title: title,
content: '',
closable: true,
icon: icon
});
} else {
$("#tabs").tabs('select', title);
}
}
希望能够帮到你!