Append some HTML into the HEAD tag?
- by Alex
Hi!
I want to add some style to head tag in html page using javascript.
var h = document.getElementsByTagName('head').item(0);
h.innerHTML += '<style>a{font-size:100px;}</style>';
But when I run this code in IE8 I see this error message:
Could not set the innerHTML property. Invalid target element for this operation.
Any ideas?