How to add onload event to a div element
No, you can’t. The easiest way to make it work would be to put the function call directly after the element Example: or – even better – just in front of </body>: …so it doesn’t block the following content from loading.