I need to load a function as soon as a page loads, but I am working with a CMS that does not provide me access to the BODY tag. So I am not able to load it on the body, but in the content of the page. Any suggestions on the best way of loading a function in the content of the page?
I prefer to have it in regular Javascript, Jquery has been causing problems with the site as well.
You can use
As Quentin commented, you can also use
addEventListenerorattachEvent.