1. Home
  2. Computing & Technology
  3. JavaScript

Body Fat Calculator

3. Javascript

clr gif
Join the Discussion

Questions? Comments?

More of this Feature

Introduction HTML

The final step is to install the Javascript that does the actual calculations for the body fat calculator. All you need to do is to copy the following code and save it as fatcalc.js.

Most of that code is needed to validate the values that your visitor enters into the form in order to make sure that the values are numeric and within a reasonable range. The actual calculations themselves (if you are interested in what those formula actually are) can be found in the maleFat() and femaleFat() functions.

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.