extJs 文本框后面加上说明文字+下拉列表选中值后触发事件
作者:bea
代码如下: 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:"showFo
代码如下:
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]
})
}
有用 | 无用
猜你喜欢
您可能感兴趣的文章:
- js 变量类型转换常用函数与代码[比较全]
- Jquery 快速构建可拖曳的购物车DragDrop
- JavaScript 学习笔记 Black.Caffeine 09.11.28
- Ruffy javascript 学习笔记
- jquery 分页控件实现代码
- JS 动态获取节点代码innerHTML分析 [IE,FF]
- Aptana调试javascript图解教程
- jQuery chili图片远处放大插件
- document.body.scrollTop 值总为0的解决方法 比较常见的标准问题
- javascript 设置某DIV区域内的checkbox复选框
- Javascript 构造函数,公有,私有特权和静态成员定义方法
- javascript 新闻列表排序简单封装
- JavaScript Alert通用美化类
- js鼠标移动在title中显示图片的效果代码
- [原创]javascript代码在ie8里报错 document.getElementById(...) 为空或不是对象的解决方法
- javascript &&和||运算法的另类使用技巧
- JavaScript 字符串操作的几种常见方法
- javascript showModalDialog 多层模态窗口实现页面提交及刷新的代码
- JavaScript 闭包在封装函数时的简单分析