title: Clearing <textarea> with Javascript?
body: <p>I would like to have something like <code>&lt;textarea&gt;Welcome, click here to type.&lt;/textarea&gt;</code></p>
  
  <p>Then clear when the user clicks on the text area, obviously.</p>
  
  <p>But.</p>
  
  <p><strong>Before anyone mentions that there are duplicates of this question on this site already there are other details that are not mentioned in the answers. For example:</strong></p>
  
  <p>I've seen that it's possible to clear <code>&lt;textarea&gt;</code> without <code>onclick()</code> and only having an <code>&lt;textarea id="someid"&gt;</code>. I just don't know how they did it, I would like to do this. Not only do I like my code clean but I'd like to know how this was possible. (I'm thinking <code>onClick()</code> somehow being inside the <code>&lt;head&gt;&lt;script type="text/javascript"&gt;&lt;/script&gt;&lt;/head&gt;</code>?)</p>
  
  <p>I also want the <code>&lt;textarea&gt;</code> to <i>not</i> clear once someone has typed something and clicks on the text area again. <i>i.e.</i> When the user clicks the text area again to edit a certain part of the text entered.</p>
  
  <p>I don't know much Javascript but this is the way I see it working:</p>
  
  <ol>
  <li>If <code>&lt;textarea&gt;</code> matches the value <code>Welcome, click here to type</code>; it should clear the text once the user clicks in the text area.</li>
  <li>If <code>&lt;textarea&gt;</code> is empty and is no longer on focus it should return the value "<code>Welcome, click here to type.</code>" again. </li>
  </ol>
  
  <p>This means clicking on the text area again wouldn't clear the text, which prevents the text from being cleared once the user has already typed something in the box.</p>
  
  <p>Thanks in advance for helping me out! Your knowledge on this matter would be greatly appreciated. :)</p>