添加屬性: $('#areaSelect').attr("disabled",false);
移除屬性: $('#areaSelect').removeAttr("disabled");
轉載 :http://www.tuicool.com/articles/Qji2yaa
EasyUI常用控件禁用方法:
1.validatebox可以用的用法:前兩種適用於單個的validatebox;
第三種應用於整個form里面的輸入框;
<1>.$("#id").attr("readonly", true); ----- $("#id").removeAttr("readonly");
<2>.$("#id").attr("readonly", "readonly"); ----- $("#id").removeAttr("readonly");
<3>.$("#Form :input").attr("readonly", "readonly"); //對form里面的禁用
$("#Form :input").removeAttr("disabled"); //對form里面的啟用
<4>.$("input").attr("readonly", "readonly"); //對所有的input標簽禁用
2.combobox禁用啟用用法:
<1>.$("#id").combobox({ disabled: true }); ----- $("#id").combobox({ disabled: false});
<2>.$("#id").attr("readonly", "readonly"); //對單個禁用 ----- $("#id").removeAttr("readonly");
<3>.$("#fm .easyui-combobox").combobox({ disabled: true }); //對form里面的下拉框禁用
<4>.$("#ID").combobox("disable"); ------ $("#ID").combobox("enable");
3.datebox與datetimebox禁用啟用方法:
<1>.$("#fm .easyui-datebox").datebox({ disabled: true }); ----- $("#fm .easyui-datebox").datebox({ disabled: false});
<2>.$("#id").attr("readonly", "readonly"); ----- $("#id").removeAttr("readonly");
<3>.$("#fm .easyui-datetimebox").datetimebox({ disabled: true }); ----- $("#fm .easyui-datetimebox").datetimebox({ disabled: true });
4.combogrid禁用啟用方法:
<1>.$("#FPayApplySupAccountID").combogrid("disable"); ----- $("#FPayApplySupAccountID").combogrid("enable");
5.lable標簽ID附加文字:
<1>.$("#id").text("標題:"); //此方法可以屏蔽掉lable標簽內的文字