Home > Web Front-end > JS Tutorial > extJs adds explanatory text after the text box and triggers the event after selecting the value in the drop-down list_extjs

extJs adds explanatory text after the text box and triggers the event after selecting the value in the drop-down list_extjs

WBOY
Release: 2016-05-16 18:41:06
Original
1798 people have browsed it

Copy code The code is as follows:

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:'Whether to enable password policy',
xtype:'combo',
editable: false,//Do not allow input lazyRender:true,
blankText: 'Password side must be enabled', //Blank default value
allowBlank : false, //Blank is not allowed
mode: 'local',
triggerAction: 'all',
store :new Ext.data.SimpleStore({
fields: ["value", "text"], data: [['1','enabled'],['0','disabled']]
}),
// These two items should correspond to the fields above
valueField: "value",
displayField: "text",
listeners:{ change:function(){changeValue() ;}
},
anchor:'100%'
}
},{
columnWidth:.4,
layout:'form',
items:{
hiddenName:"infoFillOne",
name:"infoFillOne",
xtype:'label',
html:' is set to disabled, the following items are not available< ;/font>',
labelSeparator:'',
anchor:'100%'
}
},{
columnWidth:.6,
layout:'form',
items:{hiddenName:"updateDay",
name:"updateDay",
xtype:'textfield',
fieldLabel:'update period',
emptyText : 'Set to -1 This item is disabled',
maxLength:'100',
readOnly:false,
vtype:'day',
anchor:'100%'
}
},{
columnWidth:.4,
layout:'form',
items:{
hiddenName:"info",
name:"info",
xtype:'label',
//labelAlign:'left',
html:
' is set to -1, the item is disabled',
labelSeparator:' ',
anchor:'100%'
}
}]
}]
})
}

/**
* Whether to enable password trigger events
*/
function changeValue()
{
if(queryForm.form.findField('enable').getValue()=="0")
{
$("updateDay").disabled = true;
}else{
$("updateDay").disabled = false;
}
}
/**
*Window display
*/
function input()
{
panelShowForm();
win=new Ext.Window({
title: "Add description after extJs text box",
width:200, //Window initial width value
hight:200, //Window initial hight value
x:100, //Window initial x position
y:100, //Window initial y position
plain : true,
modal : true, //Modal window
maximizable:true, maximized display
resizable:false, //The size of the window does not allow dragging
items:[showForm]
})
}
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template