[removed] seems to trigger before the DOM is loaded (JavaScript)

后端 未结 5 1481
我在风中等你
我在风中等你 2020-11-28 13:45

I am having trouble with the window.onload and document.onload events. Everything I read tells me these will not trigger until the DOM is fully loa

5条回答
  •  野性不改
    2020-11-28 14:29

    It depends where you put the onload function (head or body tag or further down), with internal event binding seeemingly slightly different in different browsers.

    See also window.onload vs document.onload

提交回复
热议问题