In following case I want to round up the decimals. Please tell me how to do that. Now I am getting too many decimals. I wanted only 2 decimals...
<SCRIPT LANGUAGE="LiveScript">
var a=0,b=0,c=0,d=0,e=0,f=0;
function grandtotalall(form){
form.weight8mm.value = form.rods8mm.value * 4.482;
form.amount8mm.value = form.weight8mm.value * 47.7;
a = form.weight8mm.value * 47.7;
form.weight10mm.value = form.rods10mm.value * 6.984;
form.amount10mm.value = form.weight10mm.value * 47.7;
b = form.weight10mm.value * 47.7;
form.weight12mm.value = form.rods12mm.value * 10.254;
form.amount12mm.value = form.weight12mm.value * 47.7;
c = form.weight12mm.value * 47.7;
form.weight16mm.value = form.rods16mm.value * 18.234;
form.amount16mm.value = form.weight16mm.value * 47.7;
d = form.weight16mm.value * 47.7;
form.weight20mm.value = form.rods20mm.value * 28.932;
form.amount20mm.value = form.weight20mm.value * 47.7;
e = form.weight20mm.value * 47.7;
form.weight25mm.value = form.rods25mm.value * 45.888;
form.amount25mm.value = form.weight25mm.value * 47.7;
f = form.weight25mm.value * 47.7;
form.grandamount.value = a + b + c + d + e + f;
}
</SCRIPT>
Please help me out in this..