Window.onload and $of function of {



window.onload=function{}

After the page is loaded (including dom and js), the contents of the function are executed.


$(function(){})

After the page (dom) is loaded, the contents of the function are executed