2
I have this code to check if the size of the user input is in accordance with some parameters, but the size it returns is always -1 the size of the input content, it would be the case to convert to int and add 1?
$("input").keydown(function() {
console.log($(this).val().length);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="number">
Tried keyup instead of keydown?
– Maurivan
That’s exactly what Maurivan.
– Paiva83