Difference between onload() and $.ready?

前端 未结 6 1578
灰色年华
灰色年华 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:32

    Document.ready() function triggers as soon as HTML DOM loaded. But the onload() function will trigger after HTML DOM, all the body content like images loaded.

提交回复
热议问题