老问题了,四舍五入了/*
===========================================
//保留小数点位数
===========================================
*/
Number.prototype.toFixed=function(len)
{

if(isNaN(len)||len==null)
{
len = 0;
}
else
{
if(len<0)
{
len = 0;
}
}    return Math.round(this * Math.pow(10,len)) / Math.pow(10,len);}alert(0.999999.toFixed(2));