Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
function(){} 会先触发哪个?
A) window.addEvent('domready', function(){}); B) window.addEvent('load', function(){});
domready 将首先开火。
http://demos111.mootools.net/DomReadyVS.Load
domready 首先出现,因为 load 会等待页面上的所有内容在执行之前加载。