After testing for the value, the script prints the evaluation to the screen by modifying the DOM structure shown in Listing 2.
检测完该值后,脚本会通过修改清单2中显示的DOM结构来将这个评估结果显示在屏幕上。
A particular issue with DOM manipulation is that the browser needs to re-flow and re-paint (basically re-render) the affected elements on the screen.
DOM操作的一个特别问题是浏览器需要在屏幕上回流和重绘(主要是重新呈现)元素。
应用推荐