How to add a tab to the Fineui framework: fineui framework Tab
Add js Code to the F. ready (function () {...} method on the homepage
// Add the example tab window. addExampleTab = function (id, url, text, icon, refreshWhenExist) {// dynamically Add a tab // mainTabStrip: tab instance // id: tab ID // url: tab IFrame address // text: tab title // icon: tab icon // addTabCallback: callback function before the tab is created (the tabConfig parameter is accepted) // refreshWhenExist: When the tab is added, if the tab already exists, whether to refresh the internal IFrame F. util. addMainTab (mainTabStrip, id, url, text, icon, null, refreshWhenExist) ;}; // remove the Selected tab window. removeActiveTab = function () {var activeTab = mainTabStrip. getActiveTab (); mainTabStrip. removeTab (activeTab. id );};
Then write the js method on the page where you need to add tabs to the main framework.
Var basePath = '<% = ResolveUrl ("~ /") %> '; Function openHelloFineUI (id) {// alert (parent. addExampleTab); parent. addExampleTab. apply (null, ['Hello _ fineui_tab ', 'cafesmilewall/Comment. aspx? Id = '+ id + '', 'view comments', basePath + 'res/images/filetype/vs_aspx.png ', true]);}
Call the openHelloFineUI method in the event.
Webmasters of WeChat