Get the selected Tab
Gets the selected tab panel and its tab object
var pp = $ (' #tt '). Tabs (' getselected ');
var tab = pp.panel (' Options '). tab; The corresponding Tab object
Update a specific tab panel using the Update method, the Param parameter contains 2 properties:
Tab: The tab that will be updated.
Options: Tab-related configuration items.
Example:
Current Tab
var Current_tab = $ (' #frame_tabs '). Tabs (' getselected ');
$ (' #frame_tabs '). Tabs (' Update ', {
tab:current_tab,
options: {
content: ' <iframe scrolling= ' auto ' Frameborder= "0" src= "' +url+ '" "style=" width:100%;height:100%; " ></iframe> ',
//or href: ';
}
};
$ (document). Ready (function () {
$ (' #frame_tabs '). Bind (' DblClick ', function () {
var title = $ ('. Tabs-selected '). Text ();
$ (' #frame_tabs '). Tabs (' close ', title);
})
How to make a specific tab selected when Re:tabs initialization
lyw985lyw985 Aug 10:44
$ (' #tt '). Tabs (' Update ', {
tab:$ (' #tt '). Tabs (' Gettab ', ' Tab2 '),
options:{
Selected:true
}
});
Currently used in my project is yes
<div id= "tabs" class= "Easyui-tabs" style= width:1160px; "> <div id=" tabs-1 "title="
basic Information "data-options=" Fit:true ">
<div id=" tabs-2 "title=" Bid Information "data-options=" Selected:true ">//this is checked at load time. You can save a global variable in the background, Then the assignment to the interface, through the value of JS interface, and then determine the setting increase data-options= "selected:true"
function Settab ()
{
var sTab = $ ("#selectTab "). Val ();
if (STab = = "1") {
$ ("#tabs"). Tabs ("select", 0);
}
if (STab = = "2") {
$ ("#tabs"). Tabs ("select", 1);
$ ("#tabs-2"). attr ("Data-options", "selected:true");
}
if (STab = = "3") {
$ ("#tabs"). Tabs ("select", 2);
}
if (STab = = "4") {
$ ("#tabs"). Tabs ("select", 3);
}