A team that I am working on has gotten into the habit of using tags in random places in the body of our HTML pages. For example:
A few things:
Doing this slows down your page load considerably as the JavaScript code must execute before any of the rest of the page can render. If you're doing a lot of work in that JavaScript code, your browser could hang. You should try to (whenever possible) load your JavaScript code dynamically and at the end of your page (preferably before the
tag).
Purchase and read High Performance JavaScript. It will change the way you write JavaScript code.