码迷,mamicode.com
首页 > Web开发 > 详细

html和jsp页面中把文本框禁用,只能读不能写的方法

时间:2019-06-01 23:20:36      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:方法   request   disable   col   token   bsp   span   string   text   

方法常用有三种:

 

第一种,使用   onfocus="this.blur()"

1 <input name="deptno" type="text" class="dfinput" value="${requestScope.dept.deptno}"  onfocus="this.blur()"/>

 

第二种,使用   disabled=“disabled”

1 <input name="deptno" type="text" class="dfinput" value="${requestScope.dept.deptno}"  disabled="disabled"/>

 

第三种,使用  readonly=“true

1 <input name="deptno" type="text" class="dfinput" value="${requestScope.dept.deptno}"  readonly="true"/>

 

 

水平有限,如果还有其它的方式,请评论留言。

 

html和jsp页面中把文本框禁用,只能读不能写的方法

标签:方法   request   disable   col   token   bsp   span   string   text   

原文地址:https://www.cnblogs.com/eyjdbk/p/10961353.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!