2014-06-26 44 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') 
    } 
}] 

});

相關問題