var str = 4.3
//四舍五入 输出4
Math.round(str);

//上进一位 输出5
Math.ceil(str);

//舍去法取整 输出 4  
Math.floor(x)

//百分比计算 不带小数
Math.round(done/total * 100)+"%"