身体质量指数 (Body Mass Index, 简称BMI), 亦称克托莱指数, 是目前国际上常用的衡量人体胖瘦程度以及是否健康的一个标准。BMI 值超标,意味着你需要减肥了。
BMI主要用于统计分析。肥胖程度的判断不能采用体重的绝对值,它天然与身高有关。因此,BMI 通过人体体重和身高两个数值获得相对客观的参数,并用这个参数所处范围衡量身体质量。
友情链接:唐
<script> function myfunction(){ 'use strict' alert("欢迎使用 “唐雨晨” 的BMI免费测试器") var height = parseFloat(prompt('请输入身高(cm):')); var weight = parseFloat(prompt('请输入体重(kg):'));
var bmi = weight / Math.pow(height,2)*10000 var i; if (bmi < 18.5){ i=' 偏瘦。'; } else if(bmi < 24){ i=' 正常。'; } else if(bmi < 28){ i=' 偏重。'; } else if(bmi < 32){ i=' 肥胖。'; } else if(bmi >= 32){ i=' 严重肥胖。'; } else{ i=' undefined。' } alert('亲,你的BMI为 '+ bmi +',属于'+ i + '\n(友情提示:科学减肥只需"管住嘴,迈开腿!")'); } </script>