📅  最后修改于: 2022-03-11 15:01:40.357000             🧑  作者: Mango
var taskInput = document.getElementById('newTask');
var addTaskButton = document.getElementById('addTaskButton');
var incompleteTasks = document.getElementById('toDo');
var completedTask = document.getElementById('completedTasks');
var addTask = function () {
var text = taskInput.value;
var li = '' + text + ' ';
incompleteTasks.appendChild(li);
}
addTaskButton.onclick = addTask;