You may want to do that to run some initial javascript when your page loads.
For ex. in DG Tournament I use the onload event to enable Google Suggest.
In Oracle Application Express you put the onload event in the HTML Body Attribute section
If you would look in the source of your HTML page you would see something like:
<body onload="get_ApexEvangelists();">
However, when you try to put the above code as HTML Body Attribute, you may get the error "You may not declaratively set cursor focus if you specify an ONLOAD in this attribute."
The complete message:
You should always read the messages ;-) But I noticed (also with myself) that you check quickly your code to see what you did wrong. However it has nothing to do with your code...
You can fix this error by go to the Display Attributes of your Page and set the Cursor Focus to "Do not focus cursor" instead of that APEX puts the focus to the first item of the page.
People seeing this message by "Googling" the error, didn't read neither ;-)