"00001" o "00002" no son números, pero si todavía quieres hacerlo, piensa algo como:
Función para agregar ceros a la izquierda (num es valor, tamaño es el tamaño de la cadena)
function padLeadingZeros(num, size) { var s = num+""; while (s.length < size) s = "0" + s; return s; }Después:
$(function() { $("input").change(function(e){ // If the value changes e.preventDefault(); $(this).val(padLeadingZeros($(this).val(), 5)); //replace the value with the returned value of the function, 5 is size. }); });