From 350a5d5c839fdd93ce0e7a897ecf5a04036b2c1d Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 13 Jul 2026 10:56:05 +0200 Subject: [PATCH] Unterricht 13.07. --- TodoListe/index.html | 2 +- TodoListe/script.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/TodoListe/index.html b/TodoListe/index.html index ff7bf6b..b1519d2 100644 --- a/TodoListe/index.html +++ b/TodoListe/index.html @@ -20,7 +20,7 @@

Applogo Aufgabenliste

- +
diff --git a/TodoListe/script.js b/TodoListe/script.js index 73e5a44..a3ca9ad 100644 --- a/TodoListe/script.js +++ b/TodoListe/script.js @@ -1,5 +1,6 @@ const inputBox = document.querySelector("#input-box"); const todoListContainer = document.querySelector("#todo-list-container"); + function neueAufgabe(){ inputBox.focus(); @@ -66,4 +67,11 @@ function saveData(newItem = null) localStorage.setItem('data', JSON.stringify(todoItems)); } +function handleKeyPress(event){ + + if (event.key === "Enter") { + neueAufgabe(); + } +} + loadData(); \ No newline at end of file