1.disabled 属性规定应该禁用 input 元素,被禁用的 input 元素,不可编辑,不可复制,不可选择,不能接收焦点,后台也不会接收到传值。设置后文字的颜色会变成灰色。disabled 属性无法与 <input type="hidden"> 一起使用。示例:< ...
记住一条好用的,设置readonly属性为true lt input readonly true gt 更多方法,转载: http: www.jb .net web .html ...
2017-05-11 10:24 0 6695 推荐指数:
1.disabled 属性规定应该禁用 input 元素,被禁用的 input 元素,不可编辑,不可复制,不可选择,不能接收焦点,后台也不会接收到传值。设置后文字的颜色会变成灰色。disabled 属性无法与 <input type="hidden"> 一起使用。示例:< ...
readonly="readonly" 设置不起作用 用 onclick="return false;" ...
方法1: onfocus=this.blur() 当鼠标放不上就离开焦点<input type="text" name="input1" value="中国" onfocus=this.blur()> 方法2:readonly <input type="text" name ...
方法1: onfocus=this.blur() <input type="text" name="input1" value="中国" onfocus=this.blur()> 方法2:readonly <input type="text" name="input ...
有时候,我们希望表单中的文本框是只读的,让用户不能修改其中的信息,如使<input type="text" name="input1" value="中国"> 的内容,"中国"两个字不可以修改。实现的方式归纳一下,有如下几种。 方法1: onfocus=this.blur() 当鼠标放 ...
开发过程中我们可能要实现动态的form表单 ...
form表单元素设置只读 CreateTime--2017年5月5日11:42:41 Author:Marydon 1.设置文本框只读 2.设置单选框只读(禁用) 3.禁用下拉列表框 小结 ...