Create a weight converter. Create an input element that can convert a value from one weight measurement to another. Step 1 add html. Returns a string the text to display and use it like this. Screen shot of bmi calculator. Script languagejavascript function calculatebmi var weight documentbmiformweightvalue var height documentbmiformheightvalue if weight 0 height 0 var finalbmi weight height100height100 documentbmiformbmivalue finalbmi if finalbmi 185 documentbmiformmeaningvalue that you are too thin.
In the metric system bmi is calculated with the following formula. Select compute bmi and your bmi will appear below. Bmi w h100 h100 where w is weight in kg and h stands for height in centimeter. Calculate your body mass index. Script for bmi calculator. Returns a number the bmi function bmitohealthbmi todo determine what text to display based on the bmi value.
Body mass index bmi is a measure of body fat based on height and weight that applies to adult men and women. Function calculatebmiheight weight todo calculate bmi based on height and weight passed in. Enter your weight and height using standard or metric measures. Bmi 703 x mass lbs height 2 in the resulting bmi will indicate whether a person is underweight just right or overweight. Bmi mass kg height 2 m for you guys who are using the imperial measurement system simply multiply it by 703.