//屏蔽form修改功能,比setDisabled好看 setFormDisabled:function(readonly){ setTimeout(function(){ // this.formField.ownershipType.setDisabled(readonly); // this.formField.externalInvest.setDisabled(readonly); // this.formField.busiPlace.setDisabled(readonly); for(var i in this.edeclareManagementForm.formField){ var objectItems = this.edeclareManagementForm.formField[i].items; for(var j=0;objectItems&&j<objectItems.length;j++){ objectItems.itemAt(j).readOnly = readonly; } } // this.setGridDisabled(this.edeclareManagementForm.investGrid,readonly); // this.setGridDisabled(this.edeclareManagementForm.manageGrid,readonly); // this.setGridDisabled(this.edeclareManagementForm.declarantGrid,readonly); // this.edeclareManagementForm.investGrid.setDisabled(readonly); // this.edeclareManagementForm.manageGrid.setDisabled(readonly); // this.edeclareManagementForm.declarantGrid.setDisabled(readonly); this.edeclareManagementForm.getForm().items.each(function(f){ if (typeof f.setDisabled=='function') { if (readonly) { // f.removeClass('x-form-field-readonly'); // f.addClass('x-form-field-readonly'); f.el.dom.readOnly = true; //处理下拉框和日期控件 if (f.onTriggerClick) { f.disabled = true; } } else { // f.removeClass('x-form-field-readonly'); f.el.dom.readOnly = false; if (f.onTriggerClick) { f.disabled = false; } } } f.initValue(); }.createDelegate(this)); if(readonly){ this.edeclareManagementForm.getForm().findField("registerDate").blur(); }else{ this.edeclareManagementForm.getForm().findField("registerDate").focus(false); } }.createDelegate(this), 150); },
详细解决方案
障蔽form修改功能,比setDisabled好看
热度:86 发布时间:2012-10-10 13:58:11.0
相关解决方案
- 求jquery.form.js+jquery.validate.min.js 用ajax提交表单的代码范例
- 关于<form action >的一个有关问题
- 新手求解,使用struts报错Cannot retrieve definition for form bean studsForm on action /stu,该怎么解决
- jquery form 有关问题
- form 表单交付 <form action="<c:url value='desktop'/>"
- 项目好好的,忽然就Unknown tag (s:form).不知道为什么
- ENCTYPE="multipart/form-data"文件下传有关问题
- 生手求解,使用struts报错Cannot retrieve definition for form bean studsForm on action /stu
- CAPTCHA 模块中 ajax form 导致CAPTCHA session reuse attack detected异常,解决方法
- enctype="multipart/form-data"的页面中,获取普通表单中文值,
- 在jsp页面下导入.xls文件,报错:Posted content type isn't multipart/form-data
- jsp form 表单 提交 带特殊符号 求高手帮忙解答上多谢!
- form.getForm.submit对象不支持此属性或步骤
- jsp中<form>标记有关问题?头疼了很多天
- action无法获取<s:form>的输入解决方法
- form action 和 javascript 的提交問題解决方法
- s:form 的anction 标签[]
- 关于enctype="multipart/form-data"及过滤器的怪异有关问题~
- import form.addBookForm 有晓得这个包的出处的嘛?SOS~
- Windows Form 中怎么将 treeview 的节点与页面内容关联
- 怎样把Html文本转换为System.Windows.Form.HtmlDocment对象!解决方法
- Form.FormClosing事件不触发(winform)解决思路
- 将html form 内容写到后盾
- .net MVC下运用FckEditor检测到有潜在危险的 Request.Form
- 从客户端(FCKeditor1="哇啦哇")中检测到有潜在危险的 Request.Form 值
- freetextbox 检测到有潜在风险的 Request.Form 值
- 从客户端(Content="<p>测试</p>")中检测到有潜在风险的 Request.Form 值
- context.Request.Form[""]获取不到值,该怎么解决
- 为什么asp.net4.0中禁用请求验证还提示“有潜在危险的 Request.Form 值”解决思路
- 错误详细信息: System.Web.HttpException: 一页只能有一个服务器端 Form 标记