5
I would like to know how to put a sentence inside a form field, and it will disappear when you click inside the field.
How do you do it in CSS? How do you do it?
5
I would like to know how to put a sentence inside a form field, and it will disappear when you click inside the field.
How do you do it in CSS? How do you do it?
8
There is a property in HTML5 called placeholder
who does whatever you want.
<input type="text" placeholder="Digite seu nome" />
1
You can use the placeholder, as stated, or use js and clear the field whenever you click on it.
<input type="text" id="input" value="Value" onClick="func()"/>
<script>
var func= function(){
var elem = document.getElementById("input");
elem.value = "";
}
</script>
Browser other questions tagged javascript jquery css
You are not signed in. Login or sign up in order to post.
thank you very much! It worked 100%
– Gladison Neuza Perosini
Simple and accurate !
– Pedro Augusto