var body = document.querySelector('body');
window.onload = function () {
body.innerHTML += 'This comes from the first onload handler
';
};
window.onload = function () {
body.innerHTML += 'This comes from the second onload handler
';
};
window.addEventListener('load', function () {
body.innerHTML += 'This comes from the third onload handler
';
});