<head><script>function iniciar(){//lo que quieras}onload=iniciar;</script></head>
<head><script>function iniciar(b){ return function (){alert(b);}}onload=iniciar('hola');</script></head>