document.write('

解析: 除了页面在首次加载时必然要经历该过程之外,还有以下行为会触发这个 行为:

(1)DOM 元素的添加、修改(内容)、删除(reflow+ repaint);

(2)仅修改 DOM 元素的字体颜色(只有 repaint,因为不需要调整布局);

(3)应用新的样式或者修改任何影响元素外观的属性;

(4)resize 浏览器窗口、滚动页面;

(5)读取元素的某些属性(offsetLeft、offsetTop、offsetHeight、offsetWidth、 scrollTop/Left/Width/HeightclIEntTop/Left/Width/Height、getComputedStyle()、 currentStyle(in IE))。

 

');