EXTJS4.0 表单form设置属性为只读

在网上找了好多例子,找的都不对。

http://stackoverflow.com/questions/12895606/extjs-set-read-only-for-all-fields-on-form-on-the-fly老外这个网站上最终找到了结果。

直接给出我的代码。转载请注明:http://blog.csdn.net/fuli_mouren/article/details/9015097。。。。

//遍历form表单
	f.getForm().getFields().each(function(field) {
		//设置只读
		field.setReadOnly(true);  
	})

f  就是我自己的表单元素。

效果图:


posted @ 2013-06-03 17:06  梅尔加德斯  阅读(393)  评论(0编辑  收藏  举报