I want a user to input a number into input type="tel"
or type="number"
and then to make a variable with this number for further calculations. So far it is unable to identify a number. Any ideas?
function digit() {
var num = document.getElementById('inpt');
document.body.innerHTML = num;
}
<input onchange="digit()" type="tel" name="numb" id="inpt" />