jQuery MiniUI
标题:
能不能批量设置 enabled 属性~
[打印本页]
作者:
孤枫丹影
时间:
2014-7-28 19:45:40
标题:
能不能批量设置 enabled 属性~
一个form 里面有很多的 input框,有没有办法快速的让所有的 都enabled =“false”
作者:
felt
时间:
2014-7-28 20:33:56
var controls=form.getFields()
for(....){
controls【i】.setEnabled(false)
}
作者:
zhq3k
时间:
2014-7-29 11:01:54
var controls=form.getFields();
var mycontrolNames = ["inputdate","customerCode","Tamt"];
$.each(controls,function(i,control){
if (mycontrolNames.indexOf(control.name) > -1){
control.setEnabled(false);
}
});
作者:
孤枫丹影
时间:
2014-7-29 11:32:31
felt 发表于 2014-7-28 20:33
var controls=form.getFields()
for(....){
controls【i】.setEnabled(false)
Ok,可以了,多谢了哈~
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2