element.onload vs element.addEventListener("load",callbak,false)

25.3k Views Asked by At

Can someone please explain what the difference is between the following two ways to specifying onload callback functions in javascript?

element.onload = callback

AND

element.addEventListener("load",callbak,false)
0

There are 0 best solutions below