1
Good afternoon, I would like to know how to remove onClick from the input using the function itself that is in 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 on one of these inputs the onClick function would activate and at the end of the function cause that clicked input to lose the onClick function, change the class to adduser2 and gain value = Success.
by clicking on the first input:
<input type="submit" class="adduser2" value="Sucesso">
Thank you!
Could you improve your question? And if possible put the example code, it helps to understand! ;)
– Kayo Bruno
@kayoBruno changed the question. See if you’ve gotten better at understanding.
– rhundler