Insert html between the head tags using JavaScript
<p>In previous quests we looked at how we could insert code into a tag and with multiple attributes, and before the first tag (doctype), but what about inserting code between the head tags such as new CSS style sheets and JavaScript inserts.</p>

<p>I did searched here and found some related posts, but no examples that work.</p>

<p>For example, how to add the following lines of code using JavaScript only...</p>

<pre><code>&lt;link rel="stylesheet" type="text/css" href="chrome.css" /&gt;
&lt;script type="text/javascript" src="chrome.js"&gt;&lt;/script&gt;
</code></pre>

<p>One suggestion below looked promising, but when tested it didn't actually work, for example...</p>

<pre><code>var refScript = "&lt;SCRIPT&gt;alert('OK');&lt;/SCRIPT&gt;";
document.getElementsByTagName("head")[0].innerHTML += refScript;
</code></pre>
