dojo.require("dijit.layout.TabContainer");
dojo.require("dijit.layout.ContentPane");
// TabContainer erstellen
tcMain = new dijit.layout.TabContainer({
region: "center",
useMenu: "True",
useSlider: "True"/*,
tabPosition: "right-h"*/
});
// Tab (ContentPane) erstellen
var tab = new dijit.layout.ContentPane({
title: "tab",
id: "tabName",
closable: "True",
href: "inhalt.html"
});
tcMain.addChild( tab );
// Tab auswählen
tcMain.selectChild( tab );
Ansonsten auf die ID des Tabs zurückgreifen, die man beim Erstellen zugewießen hat:
tcMain.selectChild( dojo.byId("tabName") );