outerHTML in the JavaScript DOM

preview_player
Показать описание

In this video I show an example of both retrieving and getting this property - as well as a demonstrating example of what might happen if you try and change the tag name.

For your reference, check this out:

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

Thanks bro. But I don't understand, after setting the outerHTML if I try to see the value of outerHTML property again in console, why I am getting same value but couldn't get the updated value.

damo
Автор

but... then what is difference with the innerHTML specialy with your last exemple.
Im quite confuse.

sookiezboly
Автор

ı have a question ....we can do these operations with css and html..why javascript?

slymnvr
Автор

Thankyou for such a nice and detailed explanation.

arunbakshi
Автор

even though your video doesn't get a ton of views you still have saved my life thank you

joshuaruvalcaba
Автор

Thank you for the demonstration! I have noticed that I cannot use outerHTML to set an element with nested elements. Is this your experience as well? Any idea why?

juju