0
我在選項卡組中有4個選項卡。點擊標籤名稱的標籤轉換工作正常。但是我需要在tab3中點擊按鈕事件來從tab3打開tab2。我怎樣才能做到這一點。鈦中打開選項卡組的問題
示例代碼,
<Alloy>
<Tab id="one">
<Window class="container">
<Label>This is the Home View</Label>
</Window>
</Tab>
<Tab id="two">
<Window class="container">
<Label>This is the second View</Label>
</Window>
</Tab>
<Tab id="three">
<Window class="container">
<Button onClick="saveLang">Proceed</Button>
</Window>
</Tab>
</Alloy>
控制器:
function saveLang()
{
// How can we open only tab2 here
// I tried open index, the loading time taking long and also it is opening tab1 But I need to open tab2 for this event
}
我不知道是由於某些原因,如果我包含標籤組的id,我得到一個應用程序錯誤。假設在'index.js(line2) – Vinod 2014-11-05 11:09:49
'undefined'不是一個對象(評估'a.inex.open'),你應該使用'$ .myTabGrp.open();',因爲根元素現在是tabgroup, id ='myTabGrp'' – turtle 2014-11-05 11:12:53
還有一些錯字錯誤修復了答案 – turtle 2014-11-05 11:17:02