网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  HTML中input文本框只读不可编辑的方法

HTML中input文本框只读不可编辑的方法

分类: IT文章 • 2025-01-22 23:22:49

方法1: onfocus=this.blur() 当鼠标放不上就离开焦点
<input type="text" name="input1" value="哈哈" onfocus=this.blur()> 

方法2:readonly 
<input type="text" name="input1" value="哈哈" readonly> 
<input type="text" name="input1" value="哈哈" readonly="true"> 

方法3: disabled 
<input type="text" name="input1" value="哈哈" disabled="true">

相关推荐

  • editor多功能文本框在有些计算机上不能正常加载,解决方法,本人用的是把js调用方法放到后面) IE8 中"HTML Parsing Error:Unable to modify the parent container element before the child element is closed"错误
  • HTML中input文本框只读不可编辑的方法
  • 设置select为不可编辑的2中方法
  • HTML中的表格变成可编辑状态解决方法
  • 使input文本框不可编辑的3种方法
  • HTML中让表单input等文本框为只读不可编辑的方法
  • HTML:让表单 文本框 只读,不可编辑的方法
  • 在GridView中 有没有好的方法根据rows中某个字段值确定它可不可以编辑同删除解决办法
  • 使input文本框不可编辑的3种方法
  • asp.net中怎样在前台用js为html标签的文本框赋当前时间和当前时间的前三天的时间?解决方法
  • jQuery extend方法介绍
  • 实验八——函数定义及调用总结
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号