Forum Moderators: open
In the second case
"window.onload = function(){}" is the statement and there is no label
In most cases the statements will do the same job as "onload" will likely resolve to "window.onload"
Use the second case, labels in most cases bad practice.