4
I have a form that sends likes to my database by clicking the button.
<form action="envia_curtir.php" method="post">
<button class="icones icone-polegares-para-cima" id="botao"></button>
<?=$curtida['curtidas'];?>
</form>
What can I do to disable the button after clicking? Because I don’t want the button to be triggered more than once.
I’m using pure javascript, but the way you put the button is disabled always and not only after it has been clicked.
– Francis Vagner da Luz
@Francisvagnerdalight the button will only be disabled after it has been clicked. Hence the event
onclick
. You want the button to be enabled again after the form has been submitted?– Daniel 101
So Daniel, but I put code here and the button was disabled even before clicking
– Francis Vagner da Luz