javascript - HTMLElement or document.createElement? -
I'm learning JavaScript, and I thought there are two simple ways to create HTML elements: HTMLElement
and document.createElement
.
Has one of these been excluded, and if it is not what you think I should use?
Thanks
You do not have an element with HTMLElement
So that you should use the document.createElement
. HTMLElement
is just an interface.
Here is the documentation
Comments
Post a Comment