Calcul de l’IMC
// <![CDATA[ function computeBMI() { document.getElementById('taille').style.backgroundColor = "white"; document.getElementById('poid').style.backgroundColor = "white"; var t = document.getElementById('taille').value; var p = document.getElementById('poid').value; if (!t.match(/\d{2,3}/)) { document.getElementById('taille').style.backgroundColor = "orangered"; } if (!p.match(/\d{2,3}/)) { document.getElementById('poid').style.backgroundColor = "orangered"; } if ((!t.match(/\d{2,3}/)) || (!p.match(/\d{2,3}/))) { return; } var bmi = Number(p) / ( (Number(t)/100) * (Number(t)/100) ); var bmi_txt = bmi.toFixed(1); document.getElementById('bmi').innerHTML = "Votre IMC est " + bmi_txt; //document.getElementById('compute').style.visibility= "hidden"; document.getElementById('result').style.visibility= "visible"; document.getElementById('i1').style.backgroundColor= "white"; document.getElementById('i2').style.backgroundColor = "whitesmoke"; document.getElementById('i3').style.backgroundColor = "white"; document.getElementById('i4').style.backgroundColor = "whitesmoke"; document.getElementById('i5').style.backgroundColor = "white"; document.getElementById('i6').style.backgroundColor = "whitesmoke"; document.getElementById('i7').style.backgroundColor = "white"; if (bmi < 16.5) { document.getElementById('i1').style.backgroundColor = "yellow"; } else if (bmi <= 18.5) { document.getElementById('i2').style.backgroundColor = "yellow"; } else if (bmi <= 25) { document.getElementById('i3').style.backgroundColor = "yellow"; } else if (bmi <= 30) { document.getElementById('i4').style.backgroundColor = "yellow"; } else if (bmi <= 35) { document.getElementById('i5').style.backgroundColor = "yellow"; } else if (bmi
Calcul de votre indice de masse corporel
Votre taille en centimètres: | |
Votre poid en kilogrammes: | |
– |
Interprétation de l’IMC
IMC (kg:m2) | Interprétation |
---|---|
moins de 16.5 | dénutrition |
16.5 à 18.5 | maigreur |
18.5 à 25 | corpulence normale |
25 à 30 | surpoids |
30 à 35 | obésité modérée |
35 à 40 | obésité sévère |
plus de 40 | obésité morbide ou massive |