js按照長度給指定的數字前面補0

js按照規定的長度給指定的數字前面補0 function prefixIntrger(num,length){ return (Array(length).join(‘0’)+num).slice(-length); }web
相關文章
相關標籤/搜索