Jquery Asp.net button disable

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

html code:


Jquery Code:

$(\'[id$=b         


        
6条回答
  •  庸人自扰
    2021-02-09 15:19

    The sample code is using the ends-with selector. There is no mistake in selector. you just need to change the code like this

    $('[id$=btnTest]').click(function () {
           $('[id$=btnTest]').attr('disabled', true);
    });
    

    I have tested this and works fine without any issues.

提交回复
热议问题