Posted in Javascript onOctober 17, 2013
//使页面不可编辑 function disableOcx() { var form = document.forms[0]; for ( var i = 0; i < form.length; i++) { var element = form.elements[i]; //部分元素可以编号 element.name 是元素自定义 name if (element.name != "auditEntity.auditContent" && element.name != "auditEntity.auditAutograph" && element.name != "auditEntity.auditTime" && element.name != "auditEntity.auditState" && element.name != "submitBtn" && element.name != "reset" && element.name != "id" && element.name != "processInstanceId" && element.name != "updateForm") { element.disabled = "true"; } } } window.onload = disableOcx;//当页面加载的时候执行此函数 //取消不可编辑 function noDisable() { var form = document.forms[0]; for ( var i = 0; i < form.length; i++) { var element = form.elements[i]; element.disabled = false; } }
js 使FORM表单的所有元素不可编辑的示例代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@