+ 6

innerText vs innerHTML

Can anyone explain me the difference between innerText and innerHTML in Javascript. and when we use them.

11th Jul 2020, 5:40 PM
Samir Singh
Samir Singh - avatar
1 Resposta
+ 6
if you want not only text but also insert html into a element then you can do that with innerHTML.
11th Jul 2020, 5:59 PM
JaScript
JaScript - avatar