Element.innerHTML
Property set or get descendant elements of HTML syntax representation.
Note: If a <div>
, <span>
or <noembed>
node has a child text node that contains the character (&),
(<),
or (>)
, innerHTML
these characters are returned as & amp ;, & lt; and & gt;.
Use Node.textContent
can get a correct copy of the text of the content of these nodes.
textContent content will get all the elements, including the `<script>` and `<style>` elements, innerText will not get `<script>` and `<style>` element
innerText cause reflow,