Try this
To round off:
Math.round(77.888555*100)/100 ;
Output => 77.89
To truncate try this
var n=77.888555;
alert(truncate(n));
function truncate(num)
{
var returnValue=num.toString();
var pos = returnValue.indexOf(".");
if ( pos == -1 )
{
return returnValue + ".00";
}
else
{
returnValue += "00";
return returnValue.substr(0,pos+3);
}
}
Output => 77.88