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

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -