<!DOCTYPE html> | |
<!-- | |
| The onload event should fire on the window object when the document (and all | |
| resource) have finished loading. | |
| https://www.w3.org/TR/html5/webappapis.html#event-handlers-on-elements,-document-objects,-and-window-objects | |
--> | |
<html> | |
<head> | |
<style> | |
body { | |
font-size: 60px; | |
} | |
</style> | |
</head> | |
<body> | |
<script> | |
window.addEventListener('load', function () { | |
document.getElementById('text-box').innerHTML = "onLoad event fired."; | |
}) | |
</script> | |
<div id="text-box"> | |
</div> | |
</body> | |
</html> |