dojoType="dijit.form.ValidationTextBox"
可以用一下,来设计readOnly
dojo.attr("dijit_form_DateTextBox_0", "readOnly", true)
"dijit_form_DateTextBox_0" --– dojo.byId("field_id")
如果要设置
dojoType="dijit.form.DateTextBox" 和 dojoType="dijit.form.FilteringSelect"
为readOnly
必需添加 dojo.require("dijit.form._FormWidget");
然后执行
function setReadOnly(fieldID){
var field = dijit.byId(fieldID);
dojo.attr(field, "readOnly", true);
}