Add input processing

This commit is contained in:
Julian
2022-02-05 17:22:39 +01:00
parent 169c2ee9b9
commit ce826a833b
2 changed files with 23 additions and 4 deletions

View File

@@ -302,4 +302,25 @@
});
}());
}());
//var form = document.getElementById("js-submitbtn");
document.getElementById("js-submitbtn").addEventListener("click", function () {
//form.submit();
//console.log("Hello world!");
//document.getElementById("js-attentants").elements["foo"]
var inputs = document.querySelectorAll('input');
console.log(inputs);
console.log("Vorname:" + inputs[0].value);
console.log("Nachname:" + inputs[1].value);
console.log("Telefon:" + inputs[2].value);
for (let i = 3; i < inputs.length; i+=2) {
console.log("Mitbringsel:" + inputs[i].value, inputs[i+1].value);
}
});