//The execution is later than the execution of the entry function of jq;
window.onload = function () { console.log("I am the entry function of js, and finally execute the internal code!"); }; //jq is just when the page label is loaded carried out. $(document).ready(function () { console.log("I don't have to wait for pictures and other resources to load..."); }); //js finally starts execution. $(function () { console.log("I need to wait for pictures and other resources to load..."); });