input中text设置不可修改(转)

转自:http://blog.sina.com.cn/s/blog_84f5d20b0100wpe0.html

<input type="text" name="haha1" readonly><br>   //文本域可点击但无法输入
<input type="text" name="haha3" disabled>     //文本变成灰色不可修改
<input type="text" name="haha2" onfocus="this.blur()">  //点击文本框没反应

原文地址:https://www.cnblogs.com/ssfie/p/3086575.html