Home  >  Q&A  >  body text

What does window.onload mean?

What does window.onload mean?

Why not use it directly: box=document.getElementById("box")

This should also be used globally, right?

JuJoJuJo2084 days ago1453

reply all(3)I'll reply

  • 韦小宝

    韦小宝2019-02-28 10:42:36

    The function of window.onload is to refresh the page. The variables declared in box=document.getElementById("box") are global variables

    reply
    1
  • JuJo

    Got it, thank you teacher

    JuJo · 2019-02-28 10:44:40
  • Cancelreply