📝 输入信息
function calculateZones() { const age = parseInt(document.getElementById('age').value); if (!age || age < 10 || age > 100) { alert('请输入有效年龄(10-100)'); return; } const mhr = 220 - age; document.getElementById('mhrValue').textContent = mhr + ' bpm'; document.getElementById('resultCard').style.display = 'block'; const zones = [ { id: 'z1', min: 50, max: 60 }, { id: 'z2', min: 60, max: 70 }, { id: 'z3', min: 70, max: 80 }, { id: 'z4', min: 80, max: 90 }, { id: 'z5', min: 90, max: 100 } ]; zones.forEach(z => { const low = Math.round(mhr * z.min / 100); const high = Math.round(mhr * z.max / 100); document.getElementById(z.id + 'Range').textContent = low + '-' + high + ' bpm'; }); }