javascript the difference between innerText vs. innerHTML vs. textContent
getValue.innerHTML// => This element is <strong>strong</strong> and has some super fun <code>code</code>!
4
7
Inner text below. It inject string as it is into the element.
My name is <b class="name">Raj Yadav</b>.
Inner html below. It renders the string into the element and treat as part of html document.
My name is Raj Yadav.
Thank you!
7
0
4
3
getValue.textContent// => This element is strong and has some super fun code!
Thank you!
3
0
Are there any code examples left?
New code examples in category Javascript