This code is in the document head.

Various Script Locations

There is JavaScript in the body.

This code is running from the document body.