samedi 28 août 2021

Concept of innerHTML and outerHTML in scraping?

The innerHTML & outerHTML both are the belongings element object of JavaScript's. Both of these element objects are used for replacing the selected tag & content.

InnerHTML is used for getting or setting the content of the selected while outerHTML is used for getting or setting content with the selected tag.

From the above difference between innerHTML & outerHTML one can elaborate that innerHTML represents the inner elements of HTML, this is based entirely upon how they treat the attributes of features, and outerHTML represents the similarity with innerHTML, it includes the contents, but it does also include the opening & closing tags. enter image description here




Aucun commentaire:

Enregistrer un commentaire