滿意答案
kkxccx02
2013.10.05
采納率:53% 等級:13
已幫助:13021人
var store = new Ext.data.SimpleStore({
fields:['value','text'],
data:[
['0','x'],
['1','y']
]
})
var combo = new Ext.form.ComboBox({
fieldLabel:'選擇',
name:'combo',
store:store,
displayField:'text',
valueField:'value',
mode:'local',
emptyText:'請選擇',
listeners:{
'select': function(){
if(combo.getRawValue() == 'y')
{
form1.hide();
form2.show();
}
else
{
form2.close();
form1.show();
}
}
}
})
var form1 = new Ext.form.FormPanel({
renderTo:'form1',
height:100,
width:200,
layout:'form',
items:[combo]
})
var form2 = new Ext.form.FormPanel({
renderTo:'form2',
layout:'form',
height:100,
width:100,
hidden:true,
items:[{html:'1111111111111'}]
})
------------------------------
簡單的還是應該自己搞搞。
02分享舉報