Event on a disabled input

前端 未结 10 2468
攒了一身酷
攒了一身酷 2020-11-21 15:53

Apparently a disabled is not handled by any event

Is there a way to work around this issue ?



        
10条回答
  •  死守一世寂寞
    2020-11-21 16:03

    suggestion here looks like a good candidate for this question as well

    Performing click event on a disabled element? Javascript jQuery

    jQuery('input#submit').click(function(e) {
        if ( something ) {        
            return false;
        } 
    });
    

提交回复
热议问题