You're not calling the function, you're telling the browser which function to call, onload.
Referencing a function and calling a function are never interchangeable: they're completely different things.
You may, however, call a function that returns a function:
function getFunction() {
return function() {
alert("I'm the real onload function.");
};
}
window.onload = getFunction();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…