JavaScript Tutorial for Beginners - 38 - Remove element

preview_player
Показать описание
In this video we will remove an element.

Рекомендации по теме
Комментарии
Автор

You break it down so a student can follow along and learn javascript, Thanks and keep up the good work.

joemendez
Автор

I like to try and go a step ahead and see if I can figure it out. :)

Stangil
Автор

Your videos are great. One question, every time I would add the remove element, it would not work and even the newParagraph() function is no longer working. It would only work if I am going to remove the removeParagraph(). Please help.

dennishermoso
Автор

Hi Mr.EJ, really enjoyed your video, better organized than some of the paid course on Udemy. I got a suggestion, could you give a link or a key word for us to goole for details about methods. Remembered in one of your CSS video, you told audience to google "website color matching". That was really helpful. For some beginners like me, we just do not know the right technical word to google for the right thing.

thomasyuanji
Автор

seems like the user is the one with the ability to add and remove. as a web developer we need to be the one adding and removing or editing the page with JS. the button seems like the user is the one who has control of the page.

geraldfoushee
Автор

sir "var  parent" is the parentNode of elementH. so how "parent" could  working in  parentP to remove.

ahammedshibil
Автор

sir you open h2 heading and close h1 heading in tutorial 37 and 38 is this error or i read your code wrong

mohitrathaur
Автор

Great stuff ! Your videos are very good

MrRedhawk
Автор

Anyone meet the error of "Cannot read property 'parentNode' of undefined" when remove the para?

TV-vufg
Автор

Great and SomeOne teaching me 2nd method as below:-

1st Method:
function removeHeader(){
var elementH =
var parent = elementH.parentNode;


var elementP =
var parent = elementP.parentNode;


or

2nd Method:
function removeHeader(){
var elementHs =
var elementH =
var parent = elementH.parentNode;


var elementPs =
var elementP =
var parent = elementP.parentNode;

wdevqix
Автор

Hello Mr.EJ!

Your tutorials are amazing and interesting.
I need your help on the above tutorial for removing the created elements. It was not working for me using the removeChild method. I've given the right node of <p> and <h2>. But dint work. Is there anyway I could show my html and Js code to you and you try finding the bug?

Thanks!

jithendrabaswareddy
Автор

Thanks for this nice tutorial. Why do we need to point to the parent then ask to remove the child, can't we just remove the element instead of hassle to declare the parent/child references & remove the child of the parent? In other words isn't there some function like Sorry noob here

PluieMelodique
Автор

why the paragraph index is not 2??
why its 4?
can you please tell ? thankz

mahadihassan
Автор

I was unable to get the .parentNode to refer to the div tag. it wants to refer to the Body element

tracelarson
Автор

Thank you for the great tutorial, can I find the length of a paragraph to find the last element for removing it?
I tried using
var elementP =
parent.removeChild(elementP);

without success

elinaftali
Автор

does anyone run into this issue where you click the remove button twice and it will erase the paragraph and buttons?

kingwindie
Автор

Is there a method for removing or targeting the last child of a parent?

eijiroukireeshima
visit shbcf.ru