onload
function in the global
scope:
function onload() { alert('onload called'); }
Is onload
called when the page loads?
Firefox 2 | Internet Explorer 7 | Opera 9.24 | Safari 3 |
---|---|---|---|
Yes | No | No | No |
window.onload = function () { alert('onload called'); }
Is onload
called when the page loads?
Firefox 2 | Internet Explorer 7 | Opera 9.24 | Safari 3 |
---|---|---|---|
Yes | Yes | Yes | Yes |