title: How can I turn input type="tel" into a variable with a number?
body: <p>I want a user to input a number into <code>input type="tel"</code> or <code>type="number"</code> and then to make a variable with this number for further calculations. So far it is unable to identify a number. Any ideas?</p>
  
  <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>function digit() {
      var num = document.getElementById('inpt');
      document.body.innerHTML = num;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input onchange="digit()" type="tel" name="numb" id="inpt" /&gt;</code></pre>
  </div>
  </div>
  </p>