满意答案
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分享举报