title: onChange textarea detection and clear input field
body: <p>I am trying to clear a input field in a form when the user changes the content of a textarea box with a onchange eventhandler. I don't see where my mistake is why it doesn't work.</p>
  
  <p>Here is my code example: <a href="https://jsbin.com/giwanesazi/edit?html,js,output" rel="nofollow">JSBin</a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function clear()
     {  
       document.getElementById('clearme').value= " " ;
       
     }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" id="clearme" value="123" readonly&gt;
  &lt;textarea type="text" id="test2" onChange="clear()"&gt;some&amp;#10;text&amp;#10;here&lt;/textarea&gt;</code></pre>
  </div>
  </div>
  </p>