.attr(“disabled”, “disabled”) issue

后端 未结 7 1388
再見小時候
再見小時候 2020-12-28 17:05

I have this function toggles the disabled attribute form a input field:

$(\'.someElement\').click(function(){     
  if (someCondition) {
     console.log($         


        
7条回答
  •  旧时难觅i
    2020-12-28 17:28

    To add disabled attribute

    $('#id').attr("disabled", "true");
    

    To remove Disabled Attribute

    $('#id').removeAttr('disabled');
    

提交回复
热议问题