2014-06-26 50 views
-2

我想添加一个工具栏到选项卡,但在文档中找不到任何关于该选项卡的内容。我了解一个标签基本上是一个面板。是否可以访问并添加工具栏?jEasyUI,选项卡中的工具栏

我的目标是在每个选项卡中都有一个工具栏,例如在选项卡中提交表单的提交按钮。

我使用下面的代码添加标签:

function addTab(title, url){ 
    if ($('#main-tabs').tabs('exists', title)){ 
     $('#main-tabs').tabs('select', title); 
    } else { 
     var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>'; 
     $('#main-tabs').tabs('add',{ 
      title:title, 
      content:content, 
      closable:true 
     }); 
    } 
    } 

提前感谢!

Michael

+0

您能告诉我们一些代码或者您尝试过什么吗? –

+0

没关系。标签提供的工具栏对我来说实际上已经足够了。我会去那个。 – skorge

回答

0

jeasyui在选项卡内有一个工具栏功能。这对我的目的来说已经足够了,所以我现在就去解决这个问题。

$('#tt').tabs({ 
tools:[{ 
    iconCls:'icon-add', 
    handler:function(){ 
     alert('add') 
    } 
},{ 
    iconCls:'icon-save', 
    handler:function(){ 
     alert('save') 
    } 
}] 

});

相关问题