Adding multiple onload handlers

前端 未结 4 1610
我在风中等你
我在风中等你 2020-12-03 23:52

I have two js files, each one with its own window.onload handler. Depending on how I attach the two onload handlers to the window object I get a different behaviour on the s

4条回答
  •  广开言路
    2020-12-04 00:27

    PPK's reference on addEventListener explains how do this pretty well:

    http://www.quirksmode.org/js/events_advanced.html

提交回复
热议问题