Discuss / JavaScript / 作业

作业

Topic source

root李

#1 Created at ... [Delete] [Delete and Lock User]

bmi = weight / (height*height);

if (bmi <= 0){ 

alert('不能是负数');

}else{ if (bmi <= 18.5){

alert('过轻');

}else{ if (bmi <= 25){

alert('正常');

}else{ if (bmi <= 28){

alert('过重');

}else{ if (bmi <= 32){

alert('过于肥胖');

}else{ alert('请填正确填写身高体重');

}}}}}


  • 1

Reply