Disable button in jQuery

后端 未结 11 1757
时光说笑
时光说笑 2020-11-28 02:04

My page creates multiple buttons as id = \'rbutton_\"+i+\"\'. Below is my code:

11条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 02:26

    disable button:

    $('#button_id').attr('disabled','disabled');
    

    enable button:

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

提交回复
热议问题