Good day, I am creating a form that required the user to enter digits, the digits can be large in millions or billions, using the HTML input type="number", it gives the user some stress in counting the digits, I want to format the numbers are the user is typing to make it clear so that he/she will not type the wrong figure I intend using jquery keyup, because I am using CakePHP for the project, I tested this somewhere, but I was not getting the desired answer
<form>
<label for="amount">Amount</label>
<input type="number" name="amount" id="amount" />
</form>
<script>
$(document).ready(function () {
$("#amount").keyup(function () {
$("#amount").toLocaleString();
});
});
</script>
Thank you in advance