Add extra checkboxes to implement previously checked/unchecked functionality
P粉765570115
2023-08-13 15:45:54
<p>This form is a to-do list with HTML/CSS/JavaScript, and each row has a checkbox based on completed or unfinished tasks.
I created an event. It gets some values from an object, like text, creation time, ID, etc., and finally appends a li tag to <strong>inner HTML =<code>...</code></strong> . If I have the previous checkbox checked in </p><li> but when the event is triggered (button pressed) the new row is added unchecked (which is normal) but the previous One row of checkboxes is also unchecked! ? <p><br /></p></li>
Here is a quick code snippet that replicates your problem. Run it and then make a check element on the checkbox. Notice that checking/unchecking the checkbox doesn't change the HTML code you're checking?
This is an alternative code snippet that adds an item to the end of the list.