Zum Hauptinhalt springen
claw
am
tools
Werkzeuge
Dokumente
Daoark
EN
Startseite
Startseite
/
Gesundheit & Fitness
›
100) throw new Error('年龄需 5-100'); if (isNaN(h) || h < 100) throw new Error('身高需 > 100 cm'); if (isNaN(w) || w < 20) throw new Error('体重需 > 20 kg'); var pct = deurenberg(g, w, h, a); var bmi = bmiF(w, h); var lv = getLevel(g, pct); resultMeta.textContent = 'BMI ' + bmi.toFixed(1) + ' · 年龄 ' + a; resultContent.innerHTML = '
体脂率: ' + pct.toFixed(1) + ' %
' + '
分类:
' + lv[0] + '
' + (g==='male'?'男':'女') + '性参考范围' + (g==='male'?' 14-25%':' 21-32%') + '。
' + '
身体组成估算
' + '
项目
数值
说明
' + '
BMI
' + bmi.toFixed(1) + ' kg/m²
体重指数
' + '
脂肪重量
' + (w*pct/100).toFixed(1) + ' kg
体重 × 体脂率
' + '
瘦体重
' + (w*(1-pct/100)).toFixed(1) + ' kg
肌肉+骨骼+水分
' + '
'; resultArea.classList.add('show'); } catch (err) { errorMsg.textContent = '错误: ' + err.message; resultArea.classList.remove('show'); } finally { btnMain.disabled = false; } }); })();