Revision cb255e10-f68b-4809-9402-e0cafb855126 - Stack Overflow
**Your original question was unclear, assuming Kevin's edit/interpretation is correct then this first option doesn't apply**
The typical options is using the `onload` event:
<body onload="javascript:SomeFunction()">
....
You can also place your javascript at the very end of the body; it won't start executing until the doc is complete.
<body>
...
<script type="text/javascript">
SomeFunction();
</script>
</body>
And, another options, is to consider using a JS framework which intrinsically does this:
// jQuery
$(document).ready( function () {
SomeFunction();
});