使用Jquery禁用输入

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用Jquery禁用输入相关的知识,希望对你有一定的参考价值。

simply disable an input (type=text) using Jquery.
  1. //jQuery < 1.6
  2. jQuery('input[name=name_of_the_input]').attr('disabled',true)
  3.  
  4. //jQuery >= 1.6
  5. jQuery('input[name=name_of_the_input]').prop('disabled',true)

以上是关于使用Jquery禁用输入的主要内容,如果未能解决你的问题,请参考以下文章