chadmichael Posted May 5, 2006 Share Posted May 5, 2006 Can i include a javascript file in the body of an html document? I'm sure its not a best practice, but does it work? Link to comment Share on other sites More sharing options...
Little Goat Posted May 5, 2006 Share Posted May 5, 2006 yes, just do this in the body: <script type="text/javascript" src="yourscript.js"></script> I don't think that would be bad practice...LG Link to comment Share on other sites More sharing options...
aspnetguy Posted May 5, 2006 Share Posted May 5, 2006 yes that is fine and it will work.It is not bad practice and in fact sometimes it is necessary. I like to keep mine in the <head> whenever possible though just to keep it out of the way. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now