帮助了 AmazingCounters.com 位小伙伴

【jQuery】用jQuery给文本框添加只读属性【readOnly】

<input id="id" type="text"  />


jQuery(

$("#ID").attr({ readonly: 'true' });//添加readonly属性 $("#id").attr("readonly":"readonly"); 
$("#id").removeAttr("readonly"); //去除readonly属性  

);

 

posted on 2015-09-10 14:51  云的旋律  阅读(2564)  评论(0编辑  收藏  举报

导航

前端攻城狮分享群