var xm = { height : 1.75, weight : 80.5 } var bmi = xm.weight/Math.pow(xm.height,2); if(bmi<18.5){ alert('过轻'); }else if(bmi<=25){ alert('正常'); }else if(bmi<=28){ alert('过重'); }else if(bmi<=32){ alert('肥胖'); }else{ alert('严重肥胖'); }
//过重
Sign in to make a reply
扭倒费
var xm = { height : 1.75, weight : 80.5 } var bmi = xm.weight/Math.pow(xm.height,2); if(bmi<18.5){ alert('过轻'); }else if(bmi<=25){ alert('正常'); }else if(bmi<=28){ alert('过重'); }else if(bmi<=32){ alert('肥胖'); }else{ alert('严重肥胖'); }
//过重