function placeHere( tagName, text ) {
var node = document.createElement( tagName );
node.appendChild( document.createTextNode( text + "" ) );
var scripts = document.getElementsByTagName("script"),
lastScript = scripts[ scripts.length - 1 ];
if ( lastScript.parentNode ) {
lastScript.parentNode.insertBefore ( node, lastScript );
}
node = scripts = lastScript = null;
}
<span><script type="text/javascript">placeHere("strong", "вставлен 'strong'")</script></span>