title: How to add class to an element create by appendChild
body: <p>I want to ask how to add a class for an element I create by appendChild in javascript</p>
  
  <pre><code>document.forms[0].appendChild(document.createElement("input"));
  </code></pre>
  
  <p>How to add a class for the input element I created?</p>
  
  <p>I just use Javascript and I don't like jQuery, please send answer in pure javascript.</p>