将input 的文本框改为不可编辑状态

<input type="text" id = "textid" name="名称" value="值" size="文本框宽度" maxlength="最大字符长度"/>

1)disabled="true "文字会变成灰色,不可编辑,双击鼠标不可复制
<input type="text" id = "textid" name="名称" value="值" size="文本框宽度" maxlength="最大字符长度" disabled="true "/>

2)readOnly="true" 文字不会变色,也是不可编辑的,双击鼠标可复制
<input type="text" id = "textid" name="名称" value="值" size="文本框宽度" maxlength="最大字符长度" readOnly="true"/>

 

posted @ 2017-07-31 15:18  py卡卡  阅读(649)  评论(0编辑  收藏  举报