innerHTML Compare Dom method, which performance is good? What's the difference? It's a cliché question! With the browser version and development!
- innerHTML is the industry standard developed by the world, almost all browsers have done support;
- as a native support, the implementation efficiency of innerHTML in the mainstream browser is very high;
- but he has his flaws, especially under IE's low version browser, HTML5 is not supported, and there are some other tag attributes.
In direct testing, the speed of the innerHTML is significantly faster than the DOM method (including the speed of the code), but it is said that the DOM method is faster than innerHTML in the WebKit kernel browser.
Usually uses the jquery frame, compares the HTML () and the append corresponding source code, and has done the test, found in the Firefox and the IE6, is the HTML speed is faster than append. Therefore, it is recommended to use HTML, of course, involving event binding, it is not so convenient.
innerHTML Compare Dom method, which performance is good? What's the difference?