Should I use innerhtml or nodevalue?

1

Should I use innerhtml or nodevlue to change an element?, I see that both get the same result and in my opinion innerhtml is much simpler, should I use this?

    
asked by Pachi 26.12.2017 в 06:07
source

1 answer

0

According to the user @jtbandes of the English site:

link

by referring to the article link :

  

If the element has no subelements, only text, then   (usually) has a secondary node, which is accessed as   ElemRef.childNodes [0]. In such a precise case, the standard of standards   W3C web of ElemRef.innerText is ElemRef.childNodes [0] .nodeValue.

    
answered by 26.12.2017 / 06:39
source