Disable/enable an input with jQuery?

后端 未结 18 2735
礼貌的吻别
礼貌的吻别 2020-11-21 07:47
$input.disabled = true;

or

$input.disabled = \"disabled\";

Which is the standard way? And, conversely, how do yo

18条回答
  •  时光取名叫无心
    2020-11-21 07:51

    You can use the jQuery prop() method to disable or enable form element or control dynamically using jQuery. The prop() method require jQuery 1.6 and above.

    Example:

    
    

提交回复
热议问题