stuart sanderson
Apr 4 2007, 07:39 AM
[font=Arial]
Dear Help Forum,
Can somebody please tell me the computer HTML (or Java) code for rounding a mathematical calculation to a specified number of decimal places:
e.g.,
- multiply 2.6 by 2.33 gives the answer 6.058. How do I round that to 2 decimal places - i.e., 6.06?
Thanks in advance,
Stuart Sanderson
Effovex
Apr 4 2007, 07:58 AM
HTML can't do that. Java seems a bit heavy for this purpose. You're looking for JavaSCRIPT, which is entirely different from Java.
number rounding in javascriptAlso, this belongs in the client-side scripting section, I believe. Certainly not in Feedback and Assistance, anyway.