make the initial value of an input to disappear on click and to go back on blur
<p>I have a form which contains some inputs with an initial value.
I want when someone click on some input and click off the default value will go back. and If he click on it and type something in, it won't try to erase what he put if he go back to click on it again.</p>

<p>this is the code I tried :</p>

<pre><code>&lt;input type="text" name="prenom" value="Prénom" onfocus="this.value = this.value=='Prénom'?'':this.value;" onblur="this.value = this.value==''?'Prénom':this.value;"/&gt;
</code></pre>

<p>Isn't there any other method to do that, because this code is long.</p>
