目标是在单击“ NEW TODO”按钮时创建一个新的待办事项列表,以下是我的入门脚本,有人可以帮我吗?
const classNames = {
TODO_ITEM: 'todo-container',
TODO_CHECKBOX: 'todo-checkbox',
TODO_TEXT: 'todo-text',
TODO_DELETE: 'todo-delete',
}
const list = document.getElementById('todo-list')
const itemCountSpan = document.getElementById('item-count')
const uncheckedCountSpan = document.getElementById('unchecked-count')
<div class="container center">
<h1 class="center title">My TODO App</h1>
<div class="flow-right controls">
<span>Item count: <span id="item-count">0</span></span>
<span>Unchecked count: <span id="unchecked-count">0</span></span>
</div>
<button class="button center" onClick="newTodo()">New TODO</button>
<ul id="todo-list" class="todo-list"></ul>
</div>
答案 0 :(得分:0)
DriveApp.getFolderById("1rsicZccurujGp5Ye5HUecBIAPf3_h5Pc");
newTodo()
内,通过其ID(newTodo
和其内的append <ul>
获得该todo-list
元素。我不确定您为什么将此类名称存储在数组中