title: call function with className.onclick JS
body: <pre><code>var el = document.getElementsByClassName("elements"); // this element contains more than 1 DOMs.
  el.onclick = function() { console.log("target name should be here")};
  </code></pre>
  
  <p>So I don't want to have inline JS, I want to fire function when it click to a specific DOM that has same class to any other elements.<br>
  Could anyone help please?</p>