HTML/Java, Math Rounding to specified number of decimal places |
HTML/Java, Math Rounding to specified number of decimal places |
stuart sanderson |
Apr 4 2007, 07:39 AM
Post
#1
|
Group: Members Posts: 1 Joined: 4-April 07 Member No.: 2,423 |
[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
Post
#2
|
Serious Coder Group: Members Posts: 251 Joined: 6-January 07 From: Sherbrooke, Qc, Canada Member No.: 1,477 |
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 javascript Also, this belongs in the client-side scripting section, I believe. Certainly not in Feedback and Assistance, anyway. This post has been edited by Effovex: Apr 4 2007, 08:02 AM |
Lo-Fi Version | Time is now: 26th April 2024 - 09:49 AM |