View Single Post
Old 11-21-2002, 03:05 PM   #3 (permalink)
anon
Guest
 
Posts: n/a
Er, Didnt really say what was the problem that needed to be solved... to just get 896 do parseInt(re)

Or just do

Code:
document.write("result : " + (parseInt(re*1000))/1000);
That should work to keep 3 the number to decimal places...

Lets say we had 123.4567 It would multiply by a thousand and we would get 123456.7, parseInt it. we have 123456, divide 123.456 . Done
  Reply With Quote