jQuery detect click on disabled submit button

后端 未结 10 940
日久生厌
日久生厌 2020-12-03 06:20

Fiddle: http://jsfiddle.net/ugzux/

As you can see, I have a form with a disabled (via javascript) submit button.

I want to be able to bind a click event to

10条回答
  •  失恋的感觉
    2020-12-03 07:24

    You could put a div around the submit button and attach a click function to that for when the submit button is disabled:

    $('sub-div').click(function(event){ if (attr('submit-button', 'disabled') == 'true') { alert('Button Disabled') } });

    This is just code from the top of my head, so it might not be exactly right. But you get the point.

提交回复
热议问题