[Solved] How can I turn input type=”tel” into a variable with a number?


try this

<script>
function digit() {
    var num = document.getElementById('inpt').value;
    document.body.innerHTML = num;
}
</script>

if it’s not correct try this

console.log(document.getElementById('inpt'))

and show the object in browser console

solved How can I turn input type=”tel” into a variable with a number?