//填充固定位数 function pad(num, n) { var len = num.toString().length; while(len < n) { num = "0" + num; len++; } return num; }登录后复制