欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

extJs 文本框后面加上說明文字+下拉列表選中值后觸發(fā)事件

 更新時(shí)間:2009年11月27日 15:56:38   作者:  
在用extjs做參數(shù)設(shè)置的時(shí)候,想在文本框后加入說明子,在網(wǎng)站上走了一大圈還是沒能找到合適的,小花用了一個(gè)下午的上班時(shí)間終于將這個(gè)頁面與我想要的功能做出,頁面很好看與自然,希望網(wǎng)友在用extjs做項(xiàng)目的時(shí)候用的著.

復(fù)制代碼 代碼如下:

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 : '必須啟用密碼的側(cè)咯', //為空默認(rèn)值
allowBlank : false, //不允許為空
mode: 'local',
triggerAction: 'all',
store:new Ext.data.SimpleStore({
fields: ["value", "text"], data: [['1','啟用'],['0','禁用']]
}),
// 這兩項(xiàng)要與上面的fields對(duì)應(yīng)
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>設(shè)置為禁用,則以下面項(xiàng)不可用</font>',
labelSeparator:'',
anchor:'100%'
}
},{
columnWidth:.6,
layout:'form',
items:{hiddenName:"updateDay",
name:"updateDay",
xtype:'textfield',
fieldLabel:'更新周期',
emptyText : '設(shè)為-1該項(xiàng)被禁用',
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>設(shè)置為-1,則該項(xiàng)被禁用</font>',
labelSeparator:'',
anchor:'100%'
}
}]
}]
})
}

/**
*是否啟用密碼的觸發(fā)事件
*/
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, //窗口的大小不允許拖動(dòng)
items:[showForm]
})
}

相關(guān)文章

最新評(píng)論