var Current = 1
function PrefixInteger(num, n) {
return (Array(n).join(0) + num).slice(-n);
}
console.log('点击hexValue', PrefixInteger(Current, 2)) //01
示例:在循环里面,如果是个位数就 补零
var Current = 1
function PrefixInteger(num, n) {
return (Array(n).join(0) + num).slice(-n);
}
console.log('点击hexValue', PrefixInteger(Current, 2)) //01
示例:在循环里面,如果是个位数就 补零