There is a document.createElement method that creates html элементы . Is it possible to create in a different way besides this method, like creating a regular object? And at the same time I wanted to know what the Element method was, because I don’t understand what is meant by the phrase: Интерфейс Element .

I would be grateful if you tell me a book or something similar, because I have a lot of questions about the DOM, and creating a lot of questions will be inappropriate. Thank you for understanding.

  • learn.javascript.ru read - user208916
  • I read @Hipster, but there is no answer to my question, but rather how to create an html элемент different way, past the document.createElement method. - Acne Black
  • about innerHTML read - user208916
  • You need a section: [Adding and Removing Nodes] ( learn.javascript.ru/modifying-document ) and Document and Page Objects (DOM) - Vladimir Medinsky
  • Perhaps a helpful answer to a similar question. Array-like objects JS - Grundy

1 answer 1

If self-education is interesting, then here is a link to the site, which actually is an online book. This is the Modern Javascript Tutorial , there is a section "Document, Events, Interfaces", you probably see it there.

About whether you can create html-elements as an object ... Hmm, yes, in theory, you can pervert, but in any case there should be a prototype that will assign all the built-in properties and methods, otherwise the new object will remain just a set of property-value pairs "and not an element. But this is a theory, I never wrapped myself around this. :)