title: pure javascript detect change in number typed input value
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>window.onload = function init() {
    console.log("DOM is ready!");
    var input, value;
    
    input = document.getElementById("yourGuess");
    input = input.value;
    
    input.addEventListener("checking", check, false);
    
    check(value);
    
  }
  
  function check(value) {
    if(input &lt; 0 &amp;&amp; input &gt; 10) {
      alert("The number must be between 0 - 10");
      value = 0;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;label for="yourGuess"&gt;You choose: &lt;/label&gt;
  &lt;input id="yourGuess" type="number" min="0" max="10"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I can't find any solution anywhere that correspond to the issue above.</p>
  
  <p>So I have a number type input and declared a min and max attribute with the value 0 and 10 respectively.</p>
  
  <p>The user can click the input field and change its value outside of range, hence I <em>need</em> to use javasricpt to check any changes made </p>