title: Javascript/HTML Oninput with div
body: <p>I've made <code>oninput</code> for <code>div</code> with a class. I can't add an ID to the <code>div</code>. So here is my script:</p>
  
  <pre><code>var objecto = document.getElementsByClassName(" nicEdit-main ")[0];
  objecto.oninput = function() {
      alert("Ok!");
  }  
  </code></pre>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;div class=" nicEdit-main   " style="width: 499px; margin: 4px; min-height: 149px; overflow: hidden;" contenteditable="true"&gt;1123215545&lt;br&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Why does <code>oninput</code> not work for this div?</p>