Home > Article > Web Front-end > Usage and difference analysis of innerHTML, outerHTML, innerText, outerText_javascript skills
The HTML in the innerHTML setting tag
outerHTML setting tag and the HTML in the tag
innerTEXT sets the text in the tag
innerTEXT sets the text in the tag, including the label, and replaces it.
innerHTML sets or gets the HTML located within the start and end tags of the object
outerHTML sets or gets the HTML form of the object and its content
innerText sets or gets the start of the object and the text within the closing tag
outerText sets (including tags) or gets (excluding tags) the text of the object