Skip to content
Advertisement

I would like to make the submit button disable just after submitting

I would like to make the SUBMIT-BUTTON disable just after submitting. Here is what I wrote and it doesn’t work. Could you please give me a clue what the problem is?

JavaScript

Advertisement

Answer

When you click the submit button, the page reloads. That is why you don’t see the disabled attribute in action. You can add evt.preventDefault(); in the event Handler to prevent the reloading

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement