I have n inputs, which are created dynamically. What happens is that they can not accept leading zeros on the following occasions:
0.24 - > The system accepts
00.24 - > The system automatically removes the leading zero to 0.24
034.55 - > The system automatically removes the leading zero to 34.55
That is, the leading zero is only possible when it is leaning to the left of the point.
To do for all inputs dynamically, I'm starting with the following function:
$(document).ready(function () {
$('input').keypress(function(e) {
// Verificar os zero à esquerda
}
});
});
Is it possible here, check these conditions from the leading zero? Or using onchage?