Setting a limit on the maximum number of input fields

I want to allow only numbers from 0 to 45 in the input field, not characters.
Must have number entry permissions such as 5.05, 8.75

This code allows input of number in 0.00 format and how to set input limit of number from 0.00 to 45.00

$("#id-name").on('blur change input', function () {
        $(this).val(function (i, input) {
            input = input.replace(/\D/g, '');
            return (input / 100).toFixed(2);

how do i do this
can you help me
Thank you

An input element can do this without JavaScript: <input type="number"> - HTML: HyperText Markup Language | MDN

Thank you for the answer
However, it allows me to enter numbers as I want without restrictions, only when using the up and down keys in the input, it applies a limit.
Since I don’t know Javascript, I can’t fully interpret it.

Sponsor our Newsletter | Privacy Policy | Terms of Service