innerText Vs. innerHTMLinnerText and innerHTML are the properties of JavaScript. innerTextinnerText is used to print the plain text information between tags and requires some layout system information. It also ignores the space. Syntax: Code: innerHTMLinnerHTML is used to print content between labels, including text information. Cross site security attaks are the main disadvantage of innerHTML. Syntax: Code: Differene between innerText and innerHTMLThe below table shows the differene between innerText and innerHTML -
Next TopicDifference between |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India