Good afternoon, I would like to know how to remove the onClick from the input using the very function that is onClick.
For example, in my case I have the following input:
<input type="submit" class="adduser" onClick="addUser(valor);" value="Adicionar">
<input type="submit" class="adduser" onClick="addUser(valor2);" value="Adicionar">
<input type="submit" class="adduser" onClick="addUser(valor3);" value="Adicionar">
I would like that when the person clicks one of these inputs the onClick function would activate and at the end of the function cause this clicked input to lose the onClick function, change the class to adduser2 and win the value = Success.
by clicking on the first input as follows:
<input type="submit" class="adduser2" value="Sucesso">
Thank you!