to do list in javascript append appendchild input value

Solutions on MaxInterview for to do list in javascript append appendchild input value by the best coders in the world

showing results for - "to do list in javascript append appendchild input value"
Theo
19 Jul 2020
1var taskInput = document.getElementById('newTask');
2var addTaskButton = document.getElementById('addTaskButton');
3var incompleteTasks = document.getElementById('toDo');
4var completedTask = document.getElementById('completedTasks');
5
6var addTask = function () {
7    var text = taskInput.value;
8    var li = '<li>' + text + '<li>';
9    incompleteTasks.appendChild(li);
10
11}
12
13addTaskButton.onclick = addTask;
14