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

[ad_1]

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

[ad_2]

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