css如何实现input不可编辑


本文摘自PHP中文网,作者coldplay.xixi,侵删。

css实现input不可编辑的方法:1、设置【onfocus=this.blur()】当鼠标放不上就离开焦点;2、设置disabled,代码为【<..name="input1" value="()" disabled="true">】。

本教程操作环境:windows7系统、css3版,DELL G3电脑。

css实现input不可编辑的方法:

方法1:onfocus=this.blur() 当鼠标放不上就离开焦点

1

<input type="text" name="input1" value="()" onfocus=this.blur()>

方法2:readonly

1

<input type="text" name="input1" value="()" readonly> <input type="text" name="input1" value="中国" readonly="true">

方法3:disabled

1

<input type="text" name="input1" value="()" disabled="true">

扩展资料:

阅读剩余部分

相关阅读 >>

css的span是什么意思

css 伪类有哪些

css中padding是什么意思

css如何实现阴影效果

css怎么旋转图片

css代表什么意思

css hover怎么设置

怎么加载css文件

css怎么增加阴影

css应该怎么设置超链接样式

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...

    暂无评论...