从dataformat里面看到的:

 

 

function pad(val,len){
    val = String(val);
    len = len || 2;
    while(val.length < len){
       val = "0" + val;
    }

   return val;
}