';
html += '| 电费 | ¥ ' + (k*p).toFixed(2) + ' |
';
html += '| 服务费 | ¥ ' + (k*f).toFixed(2) + ' |
';
html += '| 单价 (含服务费) | ¥ ' + (p+f).toFixed(2) + '/kWh |
';
html += '| 续航估算 (15kWh/100km) | ≈ ' + (k/15*100).toFixed(0) + ' km |
';
html += '| 每公里成本 | ≈ ¥ ' + (total/(k/15*100)).toFixed(2) + ' /km |
';
html += '
';
resultContent.innerHTML = html;
resultMeta.textContent = '¥ ' + total.toFixed(2);
resultArea.classList.add('show');
});
document.getElementById('btn-clear').addEventListener('click', function() { form.reset(); clearError(); clearResult(); });
})();