标签:
根据ready()方法的API说明http://api.jquery.com/ready/。
这个方法接收一个function类型的参数ready(handler), 方法的作用是: Specify a function to execute when the DOM is fully loaded.
$( document ).ready( handler ) $().ready( handler ) (this is not recommended) $( handler )
<body onload="inlineBodyOnloadTimeCounter();">
The .ready() method is generally incompatible with the attribute. If load must be used, either do not use .ready() or use jQuery‘s .load() method to attach load event handlers to the window or to more specific items, like images.
说明ready()方法和<body onload=“”>是不兼容的.
注:文章来源于转载。
jQuery $(document).ready()和window.onload
标签:
原文地址:http://www.cnblogs.com/wuxiang/p/4776332.html