Project 5:To make "To-Do List" by using HTML, CSS, and JS - CodeGenius

Breaking

Home Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Sunday 7 May 2023

Project 5:To make "To-Do List" by using HTML, CSS, and JS


To Make a "To-Do List" by using HTML, CSS, and JS

First of all, we make a To-Do List by using HTML code in  "VS Code" such as index.html and Css code written in such as Style.css and then use Javascript such as index.js file. Connect CSS files and js files with index.html and then Run...

So,

HTML Code:

CSS Code:

JS Code:


'addTodoItem(event)' is called when the "Add" button is clicked. It first overrides the default form submission behavior and then checks if the input field is not empty. If it is not empty, it creates a new <li> element with a checkbox, the text entered in the input field, and a "delete" button. Then add the new <li> element to the end of the to-do list and clear the input field.

The Delete 'Todo Item (event)' is called when the "Delete" button is clicked. Checks if the clicked element has the class "delete button", and if so, remove the parent <li> element from the to-do list.

Visit the site for more information...

No comments:

Post a Comment

Post Bottom Ad

Responsive Ads Here

Pages