1. The entry function loading mode of native js and jQuery is different
- Native js and other page DOM will be executed after loading and resources such as pictures are also loaded;
- jQuery waits until the page DOM is loaded and executed, and will not wait for resources such as pictures to be loaded;
(That is to say, it is not advisable to query the properties of resources used after loading the page through jQuery's entry function: for example $(document).ready(function(){ $('img').width();}); )
- Repeatedly writing window.onload=function(){} will be overwritten, that is, there can only be one window.onload;
- jquery, the entry function will not be overwritten;