From ae41338adeff0c35c3764ef75733ec3353d7b060 Mon Sep 17 00:00:00 2001 From: Yohan Park <88149844+yohan9569@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:58:09 +0900 Subject: [PATCH 1/3] =?UTF-8?q?FEAT:=20=EB=B2=84=ED=8A=BC=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=9D=B4=EB=B2=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple.html | 6 +++--- simple.js | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 simple.js diff --git a/simple.html b/simple.html index 2887e44..03fde04 100644 --- a/simple.html +++ b/simple.html @@ -9,8 +9,8 @@

TODO

- - + +
- + diff --git a/simple.js b/simple.js new file mode 100644 index 0000000..b6a237b --- /dev/null +++ b/simple.js @@ -0,0 +1,17 @@ +const list = document.getElementById('todo-list'); +const submitBtn = document.getElementById('submit-btn'); +submitBtn.addEventListener('click', appendList); + +function appendList() { + const item = document.getElementById('item'); + if (confirm(item.value + ' 저장하시겠습니까?') != true) { + item.value = null; + return; + } + + const node = document.createElement('li'); + const textnode = document.createTextNode(item.value); + node.appendChild(textnode); + list.appendChild(node); + item.value = null; +} \ No newline at end of file From 4d9421ec6a062b82c76f1c75de024e3725e22fd7 Mon Sep 17 00:00:00 2001 From: Yohan Park <88149844+yohan9569@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:06:00 +0900 Subject: [PATCH 2/3] =?UTF-8?q?FEAT:=20=EC=A4=91=EA=B8=89=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- detail.html | 4 +- detail.js | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 detail.js diff --git a/detail.html b/detail.html index 160571b..04170d8 100644 --- a/detail.html +++ b/detail.html @@ -9,7 +9,7 @@

TODO LIST

- +