[removed] vs <body onload=“”/>

后端 未结 13 1949
盖世英雄少女心
盖世英雄少女心 2020-11-22 13:45

What exactly is the difference between the window.onload event and the onload event of the body tag? when do I use which and how shoul

13条回答
  •  耶瑟儿~
    2020-11-22 14:29

    There is no difference ...

    So principially you could use both (one at a time !-)

    But for the sake of readability and for the cleanliness of the html-code I always prefer the window.onload !o]

提交回复
热议问题