EasyUI 遍历表单控件并禁用内部包含的控件

ar control=$('#TableLayoutPanel1');//主面板
control.find("[fsm-type]").each(function () {
$("[id=" + $(this).attr('id') + "]", control[0]).each(function () {
var type=$(this).attr('fsm-type');
switch(type)
{
case "text":$(this).attr("disabled", true);
break;
case "linkbutton":$(this).linkbutton("disable");
break;
case "htmleditor":$(this).editor('setDisabled');
break;
case "datetimebox":$(this).datetimebox('disable');
break;
case "numberbox":$(this).numberbox("disable");
break;
case "textarea":$(this).attr("disabled", true);
break;
case "combobox2": $(this).combobox2("disable");
break;
case "checkbox": $(this).attr("disabled", true);
break;
case "adplookup": $(this).adplookupbox("disable");
break;
case "my97datebox": $(this).my97datebox("disable");
break;
case "datagrid": $(this).datagrid("disable");
break;
case "treegrid": $(this).datagrid("disable");
break;
}
});
});

posted @ 2016-05-27 12:25  和田二星  阅读(1044)  评论(0编辑  收藏  举报