+ 1

What is difference between innerText and innerHtml ??

6th Aug 2021, 12:53 PM
Ashish Gupta
Ashish Gupta - avatar
3 ответов
+ 4
innerText returns all text contained by an element and all its child elements. innerHtml returns all text, including html tags, that is contained by an element.
6th Aug 2021, 1:07 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 3
There's no innerHtml method
6th Aug 2021, 4:43 PM
Calviղ
Calviղ - avatar
6th Aug 2021, 1:14 PM
Ashish Gupta
Ashish Gupta - avatar