This code doesn't seem to work:
document.body.onload = function () { ... }
I know there is a onload
event for the body tag in html, but how come you can't access it from JavaScript? Is window.onload
same as <body onload="...
It basically never triggers.