function genZeroPrefixNumber(start, nums){
var arr = [];
var ele = start;
var len = start.length;
arr.push(ele)
for(var i = 1; i<nums;i++){
var number = "" + (parseInt(ele) + 1)
var nlen = number.length;
for (var j = 0; j < len - nlen; j++) {
number = "0" + number;
}
arr.push(number);
ele = number;
}
return arr.join(",");
}
案列: