Can anyone tell me why the following page doesn\'t trigger an alert when it loads? If I use window.onload instead of document.onload it works. Why
window.onload
document.onload
The event handler is onload not document.onload. It hangs directly off the window object (which is the default object).
onload
window