how to disable submit button with jquery

前端 未结 6 2138
慢半拍i
慢半拍i 2020-12-09 15:11

I have a simple form to check the value of post code entered by the user against a variable,

I\'m trying to disable the submit button and do the check and give alert

6条回答
  •  粉色の甜心
    2020-12-09 15:47

    //disable
    $('#submit_postcode').attr('disabled', true);
    
    //re-enable
    $('#submit_postcode').removeAttr('disabled');
    

提交回复
热议问题