For completeness, let me demonstrate the impact that choosing innerText over textContent can have on performance. use innerText while updating a table use textContent while updating a table On a WebKit browser, you should see a significant performance difference (~300ms vs ~1ms). On IE9, you...
node.getElementsByTagNmae; node可以为任何节点对象 元素的内容 1、元素的HTML内容 innerHTML属性,获取包括html标记在内的所有内容 获取元素内包括html标记在内所有内容 2、文本内容 textContent属性可以获取或设置元素节点中的文本内容,识别不了html标记获取元素内纯文本内容,html标记会被忽略3、nodeValue 和 dom元素的...
Another difference lurks behindtextContentandinnerText— performance. You can find dozens of [tests on jsperf.com comparing innerText and textContent](http://jsperf.com/search?q=innerText) —innerTextis often dozens time slower. In [this blog post](http://www.kellegous.com/j/2013/02/27/inne...