extJs 텍스트 상자 뒤에 설명 텍스트+드 롭 다운 목록 선택 값 을 추가 하면 이벤트 가 발생 합 니 다.
2853 단어 extJs 텍스트 상자드 롭 다운 목록트리거 이벤트
var showForm;
function panelShowForm()
{
showForm=null;
showForm = new Ext.FormPanel({
renderTo:"showPanel",
region:'north',
border:false,
bodyBorder:false,
frame:true,
waitMsgTarget: true,
labelAlign:'right',
id:"showForm",
items:[{
layout:'column',
labelWidth:129,
items:[
{
columnWidth:.6,
layout:'form',
items:{
name:"enable",
hiddenName:"enable",
fieldLabel:' ',
xtype:'combo',
editable: false,// lazyRender:true,
blankText : ' ', //
allowBlank : false, //
mode: 'local',
triggerAction: 'all',
store:new Ext.data.SimpleStore({
fields: ["value", "text"], data: [['1',' '],['0',' ']]
}),
// fields
valueField :"value",
displayField: "text",
listeners:{ change:function(){changeValue();}
},
anchor:'100%'
}
},{
columnWidth:.4,
layout:'form',
items:{
hiddenName:"infoFillOne",
name:"infoFillOne",
xtype:'label',
html:'<font color=red> , </font>',
labelSeparator:'',
anchor:'100%'
}
},{
columnWidth:.6,
layout:'form',
items:{hiddenName:"updateDay",
name:"updateDay",
xtype:'textfield',
fieldLabel:' ',
emptyText : ' -1 ',
maxLength:'100',
readOnly:false,
vtype:'day',
anchor:'100%'
}
},{
columnWidth:.4,
layout:'form',
items:{
hiddenName:"info",
name:"info",
xtype:'label',
//labelAlign:'left',
html:
'<font color=red> -1, </font>',
labelSeparator:'',
anchor:'100%'
}
}]
}]
})
}
/**
*
*/
function changeValue()
{
if(queryForm.form.findField('enable').getValue()=="0")
{
$("updateDay").disabled = true;
}else{
$("updateDay").disabled = false;
}
}
/**
*
*/
function input()
{
panelShowForm();
win=new Ext.Window({
title:"extJs ",
width:200, // width
hight:200, // hight
x:100, // x
y:100, // y
plain : true,
modal : true, //
maximizable:true,
resizable:false, //
items:[showForm]
})
}