It depends upon what you do have access to, and if there is only one event to perform onload or not. If you have access to edit the script used by the page and there are no other onload events for that page either coded in another script you have for that page or in some other script assigned to that page by anyone/anything else, you can just put your onload in your script code. Say you wanted to have:
HTML Code:
<body onload="doSomething();">
Instead, in your script you could put:
Code:
window.onload = function(){
doSomething();
};
Bookmarks