window.onload
will wait until all assets have finished downloading, such as images and scripts.
DOM ready waits until you can access the DOM via the API.
As a side note, in this day and age, you ought to be using window.addEventListener('load', function() { }, false)
or attachEvent()
for older IEs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…