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

后端 未结 13 1787
盖世英雄少女心
盖世英雄少女心 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:40

    window.onload can work without body. Create page with only the script tags and open it in a browser. The page doesn't contain any body, but it still works..

    
    

提交回复
热议问题