Skip to content
Advertisement

How to disable submit button after click

Im currently working on an extension where I currently have a submit button and input. When a user is clicking on the submit button, the user should not be able to click on the submit button anymore and should be disabled and if the user has already entered a user ID then it should also not be able to click on submit again.

How can I be able to disable the submit button when a user has clicked it or has already clicked it before using my code below?

popup.js

JavaScript

HTML

JavaScript

CSS

JavaScript

Advertisement

Answer

You can use

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