title: Get off-type content from html input
body: <p>I'm writing some validation for a form which includes an  tag with type="number". If non-numeric text is entered in the input box, getting the element with javascript and checking the value returns an empty string (in Chrome and Firefox at least).</p>
  
  <p><img src="https://i.stack.imgur.com/3aY8W.png" alt="Non-numeric text in type=&quot;number&quot; field"></p>
  
  <pre><code>var input = document.getElementById('inputId');
  // -&gt;   &lt;input type="number" id="inputId"&gt;
  
  console.log('The value is: ', input.value);
  // -&gt;   The value is:
  
  console.log(typeof inputs.value);
  // -&gt;   string
  </code></pre>
  
  <p>Is there a way to get whatever is in the input if the entered text doesn't match the input's "type" attribute?</p>