Question: Please create a ToDo List project in Javascript with: An HTML file called index.html that contains the following: An HTML form that contains 1 text
Please create a ToDo List project in Javascript with:
An HTML file called index.html that contains the following:
An HTML form that contains text input field, a label for the input field, and a submit button with an ID additem.
An unordered list with an ID todolist that initially contains no items.
A JavaScript file that contains the following:
A variable that stores the HTML element with the ID todolist.
A variable that stores the HTML element with the ID additem.
A function called addItemToList that is called when the additem button is clicked. This function should receive a todo list item from the user via the HTML form and display it in a list. This function should exhibit the following behavior:
Store the text from the HTML text input field.
Create a new li element with the text from the input field.
Add the new li element to a class called todolistitem.
Call a function called createCheckmarkButton that will add a button to mark the list item as completed see step D to implement this function
Add the new li element to the todolist element.
Prevent a page refresh and reset the text input field to an empty string after saving the list item in the todo list.
A function called createCheckmarkButton that adds a button to each list item. This function should take one parameter representing a new list item element passed from the addItemToList function. This item marks the todo list item as "completed" by deleting it from the todo list. This function should exhibit the following behavior:
Create an HTML button element that belongs to a class called checkmarkbutton.
Add some text to the button that indicates its functionality eg X done, etc.
Listen to the checkmark button click and delete its corresponding list item.
Add the checkmark button to the list item passed as an argument.
A CSS file linked in the HTML file that styles the todo list however you like!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
