手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >extJs 文本框后面加上说明文字+下拉列表选中值后触发事件
extJs 文本框后面加上说明文字+下拉列表选中值后触发事件
摘要:复制代码代码如下:varshowForm;functionpanelShowForm(){showForm=null;showForm=ne...

复制代码 代码如下:

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]

})

}

【extJs 文本框后面加上说明文字+下拉列表选中值后触发事件】相关文章:

tagName的使用,留一笔

jquery任意位置浮动固定层插件用法实例

原生JS和JQuery动态添加、删除表格行的方法

JavaScript实现Iterator模式实例分析

CSS+JS实现点击文字弹出定时自动关闭DIV层菜单的方法

美化下拉列表

js同源策略详解

JS控制表格隔行变色

基于javascript简单实现对身份证校验

零基础学Swift:Core Foundation框架

精品推荐
分类导航