title: How do I make a trash icon clear a text area in java script?
body: <p>For example I have here</p>
  
  <pre><code>&lt;textarea id="clear"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>then instead of button onclick="(clear)" i want it to be a trash icon.</p>
  
  <p>Javascript</p>
  
  <pre><code>function clear(){
       document.getElementById('clear').value = "";
  }
  </code></pre>