How to delete html elements with javascript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to delete html elements with javascript?

Sorry if I sound like a noob, which I am I have just started learning web development on my own and currently going through basics of javascript, So I wanted to create a simple web app that receives items to add to the list with a delete button to delete it off, also a function that would strike a line through when clicked on a specific list item. I am kinda struggling with the delete and the strike through function, can get it to work on all the list items and in the delete function, I simply can't link it to any list item. Posting here and hoping for someone kind enough to help a buddy out Thanks! Here's the code: https://code.sololearn.com/WC7M1CAR0vB1/#

13th May 2019, 3:47 PM
7rus7me
7rus7me - avatar
3 Answers
+ 1
Thankyou mate, that's so cool!
13th May 2019, 5:02 PM
7rus7me
7rus7me - avatar
+ 1
Hey Biraj, i have 2 questions, what is "window.onload". 2. is "this" a reserved keyword used in javascript? and when i add an item to the list, the strikethrough functionality doesn't work, any help?
14th May 2019, 4:05 AM
7rus7me
7rus7me - avatar
+ 1
Thankyou so much again! and could you tell me where'd you learn it from or maybe recommend me some resource, I'm currently taking a course on Udemy.
14th May 2019, 9:09 AM
7rus7me
7rus7me - avatar