Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    +1 because of the firefox tip, but is there any other option besides enabling buttons on page load? Commented Feb 26, 2014 at 18:07
  • 1
    This is the cleanest way to go. I was trying to disable the submit button with a click event handler but my approach was causing issues with chrome. This solution works beautifully. Commented Feb 21, 2018 at 6:13
  • 4
    Be very careful with this approach, if you have a value on the submit button and you need it, the form will not submit it. Commented Jan 20, 2020 at 14:29
  • According to the latest jQuery documentation you should be using .prop instead of .attr. Reference: api.jquery.com/prop/#entry-longdesc-1 "The .prop() method should be used to set disabled and checked instead of the .attr() method. " Commented Jan 20, 2020 at 20:23