I'm familiar with the typical use of onload
, as in the following:
<body onload="alert('Hello, World!');">
...
</body>
What are all the html elements that fire a load event? (thus executing javascript supplied in an onload attribute)
For example, img
is one such tag that will execute the javascript supplied in an onload
attribute when some.png
has loaded:
<img onload="someImgLoaded()" src="some.png" />
'onload' is supported by the following HTML tags:
<body>, <frame>, <frameset>, <iframe>, <img>, <link>, <script>
And the following Javascript objects:
image, layer, window