1
I’d like to know how to erase the placeholder
of a input
when clicking inside it. When searching here I saw answers on how to delete the value
but I found nothing about placeholder
.
I would like a help that it is not necessary to call the function within the input
, ex:
<input type="text" id="input" value="Value" onClick="func()"/>
My Code:
<form action="enviar.php" method="post" class="wpcf7-form">
<input type="text" name="nome" value="" size="40" class="classe_form_1" placeholder="Seu nome (obrigatório)"><br>
<input type="email" name="email" value="" size="40" class="classe_form_1" placeholder="Seu e-mail (obrigatório)"><br>
<input type="text" name="assunto" value="" size="40" class="classe_form_1" placeholder="Assunto (obrigatório)"><br>
<textarea name="mensagem" cols="40" rows="10" class="classe_form_2" placeholder="Mensagem (obrigatório)"></textarea><br>
<button type="submit" class="botao_contato" id="botao-contato">Enviar</button>
</form>
You say delete as soon as you click, even without the person starting to type?
– Guilherme Lautert
That’s right @Guilhermelautert
– Wendell