dom树加载完毕 $(document).ready()//原生写法document.ready = function (callback) { ///兼容FF,Google if (document.addEventListener) { document.addEventListener('DOMContentLoaded', function () { document.remo
1.关于window.onload 和 body.onload 的区别 当我们将onload 事件写在body元素上时,真正执行的其实是window对象的onload事件.因素HTMl页面中没有window标题,所以就写在body元素上了. The onload attribute of the body object sets an onload event handler for the window. This technique of calling the window onload