js按照长度给指定的数字前面补0

js按照规定的长度给指定的数字前面补0 function prefixIntrger(num,length){ return (Array(length).join(‘0’)+num).slice(-length); }web
相关文章
相关标签/搜索