date format of textfield using java script and php
<p>i am making a form that has a date field using textfield, i want my date field to have a label format inside the textfield, here's the picture:
 <img src="http://i.stack.imgur.com/uRxPV.jpg" alt="enter image description here"> 
 after clicking on the textfield the format will be erased and the hyphen will remain like this picture:
 <img src="http://i.stack.imgur.com/lqZtq.jpg" alt="enter image description here">
 i already made the code for the label format,
here's my code:</p>

<pre><code>&lt;input type="text" name="date" value="DD_MM_YYYY" id="date" style="width:180px" onclick="if(this.value=='DD_MM_YYYY'){this.value=''}"  /&gt;
&lt;/p&gt;
</code></pre>

<p>My problem now is the hypen that will remain after clicking the textfield.</p>

<p>Anyone knows how to do that?</p>

<p>Thanks in advance.</p>
