Home >Web Front-end >JS Tutorial >Analysis of the difference between InnerHtml and InnerText_Basic knowledge
The most detailed answer can be found on MSDN
Brief explanation:
InnerText can be used to output the content you assigned to this attribute as is.
When the InnerHtml output content encounters special tags, such as , it will be interpreted by the browser as an html language tag, and will not be output.