Display the input value of a factor of 10

I have this code:

<div class="number">
  <input type="text" onkeyup="separateNum(this.value,this);" value="{input number}">
  <span>box: {number}</span>
</div>

I want when the user enters a number in the input, it is divided by 10 and displayed in a span.
For example, if the user enters the number 21, the user will immediately see the number 2 (without any further decimal value)

8 thoughts on “Display the input value of a factor of 10”

Leave a Comment