<input type="text" value="disabled" disabled><input type="text" value="disabled" disabled>
01<input type="text" value="onfocus=this.blur()" onfocus="this.blur()">02<input type="text" value="onfocus=this.blur()" onfocus="this.blur()">
复制代码
<input type="text" value="onfocus=this.blur()" onfocus="this.blur()"><input type="text" value="onfocus=this.blur()" onfocus="this.blur()">
温馨提示:
readonly和disabled的区别在于后者完全禁止与设置该属性的对象交互(表现为不可改写、不可提交等),readonly是可以提交的。
代码单词解释:
1、onfocus 当对象获得焦点时触发。
2、focus 使对象得到焦点。
3、onblur 在对象失去输入焦点时触发。
4、blur 模糊对象的内容以便使其看起来失去焦点。
以上就是怎么让Html文本框不可编辑的方法了,方法有三种,第一、二种是替换属性,第三种是添加代码,小编觉得大家可以根据自己的需要选择一种方法。
怎么让Html文本框不可编辑?崇山惹人喜爱峻岭一呼百应37. 只要你心中还有信念,你就会一次次从失败的阴霾中走出来,迎接你的必然是成功。记住:态度决定一切。成功,其实就在你心中。类似的句型还有:If necessary…, they can…125.及时当勉励,岁月不待人。《杂诗》 记得小蘋初见,两重心字罗衣。琵琶弦上说相思,当时明月在,曾照彩云归。君问归期未有期,巴山夜雨涨秋池。html文本框,文本框不可编辑,html文本框不可编辑24.Ill news travels fast. 坏事传千里。