Question: 7 . 1 6 LAB: To - do list ( JavaScript ) LAB ACTIVITY 7 . 1 6 . 1 : LAB: To - do

7.16 LAB: To-do list (JavaScript)
LAB
ACTIVITY
7.16.1: LAB: To-do list (JavaScript)
010
Overview
In this lab, you will implement a "to-do" list in JavaScript. The user can type a task into the text box and click Add to add the task to the task list. Clicking a task's button removes the task from the list.
To-Do List
New task: Complete JavaScript lab Add
Clean bathroom
Study for big exam x
Feed fish
Step 1: Inspect the project
The project contains HTML, CSS, and JavaScript files:
index. html contains the "New task:" label, textbox for entering a new task, an Add button, and an empty ordered list.
styles.css adds styling to the webpage.
todo.js contains four functions that need implementing.
Step 2: Add new task (4 points)
To add a new task, make the following modifications:
In domLoaded(), register addBtnClick() as the Add button's click event handler.
In addBtnClick(), extract the text entered in the textbox, then call addTask() with the new task.
In addTaskO:
Call document.createElement() to create a new x
7 . 1 6 LAB: To - do list ( JavaScript ) LAB

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!