function sumGuarworth()
{
guarworth1 = document.all.guarworth1.value;
guarworth2 = document.all.guarworth2.value;
guarworth3 = document.all.guarworth3.value ;
if(guarworth1 == "")
guarworth1 = 0;
if(guarworth2 == "")
guarworth2 = 0;
if(guarworth3 == "")
guarworth3 = 0;
guarworth1 = parseFloat(guarworth1); 
guarworth2 = parseFloat(guarworth2); 
guarworth3 = parseFloat(guarworth3); 
alert(guarworth2);
document.all.guartotalworth.value = guarworth1+guarworth2+guarworth3;
}
求和的有小数的话就会出现0.1+0.1=0.19999999999这种情况,如果加上.toFixed(2)
guarworth1 = parseFloat(guarworth1).toFixed(2); 
guarworth2 = parseFloat(guarworth2).toFixed(2); 
guarworth3 = parseFloat(guarworth3).toFixed(2); 
就会出现12.000.000.00这样自动拼串的结果
我想要算有小数的结果改怎么写呢?