Re: innerHTML in head
Not really. To my knowledge, once the page is loaded the CSS styles are set. You can change classes, but not add different styles.
Plus, you have an error in that code anyway. The command is getElementsByTagName(). Notice that it is plural. It returns an array of all tags that match your specification.
Code:
var headtag = document.getElementsByTagName('head').item(0);
What exactly are you hoping to accomplish? Maybe we can give you a better work-around.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.