Jquery Asp.net button disable

前端 未结 6 675
时光说笑
时光说笑 2021-02-09 14:42

html code:


Jquery Code:

$(\'[id$=b         


        
6条回答
  •  借酒劲吻你
    2021-02-09 15:30

    I think that making the button disabled in the click event handler is preventing the postback. Try executing the disabling code after some time:

    $('[id$=btnTest]').click(function(){
        var button = this;   
    
        setTimeout(function() {
            $(button).attr('disabled', 'disabled');
        }, 100);
    });
    

提交回复
热议问题