function disposeNumber(value){ if(value == null || value == ""){ return 0; }else if(value.toString().indexOf(".") == -1){ return value; }else{ return round(value, 2); }}function round(v,e){ var t=1; for(;e>0;t*=10,e--); for(;e<0;t/=10,e++); return Math.round(v*t)/t;}console.log(disposeNumber(0.1*0.2))