if $(window).load() is deprecated, what should I use?
问题 I need a function that is called when the page is totally loaded (text, image, and so on). I noticed that $(window).load() is now deprecated. So, what should I use? 回答1: If you want just avoid the load function, use the generic on function : $(window).on('load', function(){ // insert code here }); 来源: https://stackoverflow.com/questions/16735534/if-window-load-is-deprecated-what-should-i-use