Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JS onload event

0 votes
3 views
added Mar 23 in Javascript by LC Marshal First Warrant Officer (11,130 points)
edited 4 days ago by LC Marshal

The onload event can only be used on the document(body) itself, frames, images, and scripts. In other words, it can be attached to only body and/or each external resource. The div is not an external resource and it's loaded as part of the body, so the onload event doesn't apply there. 

onload event it only supports with few tags

<body>, <frame>, <iframe>, <img>, <input type="image">, <link>, <script>, <style>

src: https://stackoverflow.com/questions/4057236/how-to-add-onload-event-to-a-div-element

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...