Enter your weight and height using standard or metric measures. Bmi mass kg height 2 m for you guys who are using the imperial measurement system simply multiply it by 703.
Comp1000 2016s1 Lab Class 5 Web Page
How to calculate bmi using height and weight in javascript. Create a weight converter. In the metric system bmi is calculated with the following formula. 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. Bmi 703 x mass lbs height 2 in the resulting bmi will indicate whether a person is underweight just right or overweight. Screen shot of bmi calculator. Step 1 add html.
Returns a string the text to display and use it like this. Returns a number the bmi function bmitohealthbmi todo determine what text to display based on the bmi value. Bmi w h100 h100 where w is weight in kg and h stands for height in centimeter. Function calculatebmiheight weight todo calculate bmi based on height and weight passed in. Create an input element that can convert a value from one weight measurement to another. Body mass index bmi is a measure of body fat based on height and weight that applies to adult men and women.
Select compute bmi and your bmi will appear below. Script for bmi calculator. Calculate your body mass index.