Hypertrophie-Trainingsplan
window.onload = function() {
document.getElementById('date').value = new Date().toLocaleDateString('de-DE');
};
function generatePlan() {
var name = document.getElementById('name').value;
var experience = parseInt(document.getElementById('experience').value);
var days = document.getElementById('days').value;
var sets = document.getElementById('sets').value;
var rest = document.getElementById('rest').value;
var focus = document.getElementById('focus').value;
// Logik zur Anpassung des Formulars basierend auf der Erfahrung
if (experience > 12) {
document.getElementById('days').max = 6;
document.getElementById('sets').max = 30;
} else {
document.getElementById('days').max = 4;
document.getElementById('sets').max = 15;
}
alert(`Trainingsplan für ${name} erstellt: \nErfahrung: ${experience} Monate\nTrainingstage: ${days}\nSätze pro Muskelgruppe: ${sets}\nPausenzeit: ${rest} Sekunden\nFokus: ${focus}`);
}