Difference between onload() and $.ready?

前端 未结 6 1574
灰色年华
灰色年华 2020-11-28 05:17

Can you list the difference between onload() and $(document).ready(function(){..}) functions in the using jQuery?

6条回答
  •  旧巷少年郎
    2020-11-28 05:42

    body.onload() cares about both HTML structure and assoicated resources where as document.ready() cares only about the HTML structure.

提交回复
热议问题