用X.toFixed(2)是5舍6入的,
function xround(x, num){ return Math.round(x * Math.pow(10, num)) / Math.pow(10, num) ;}
xround(X,2)这样才是四舍五入