title: clear input boxes on button click with javascript
body: <p>I've a program which creates text input boxes dynamically. I want to clear the contents of the boxes on the click of clear button.</p>
  
  <pre><code>var elems = document.getElementsByClassName(CLId);
  var myLength = elems.length;
  var total = 0;
  for (var i = 0; i &lt; myLength; ++i) {
    if(elems[i].value != null &amp;&amp; elems[i].value &gt; 0){
      var el = elems[i];
    }
  }
  </code></pre>
  
  <p>I use this to get the values of the boxes, but don't know how to make them empty....</p>