search

Home  >  Q&A  >  body text

javascript - Why is the content in Img.onload = funcion(){} the last thing after the image is preloaded? ?

RT
Attached is the picture executed in the browser

欧阳克欧阳克2709 days ago932

reply all(2)I'll reply

  • 世界只因有你

    世界只因有你2017-07-05 11:08:11

    onload event handler called when the image is loaded.
    onload=function means that after the image is loaded, call this onload time, which is the method you wrote yourself. This method is called event callback, or delegation. balabala...anything is fine

    reply
    0
  • 世界只因有你

    世界只因有你2017-07-05 11:08:11

    onload is actually an asynchronous process

    reply
    0
  • Cancelreply