Using jQuery to echo text
<p>Is it possible to use jQuery to echo text in place of a script tag? More precisely, is there a way to accomplish</p>

<pre><code>&lt;script type="text/javascript"&gt;
    document.write("foo");
&lt;/script&gt;
</code></pre>

<p>... without the use of <code>document.write</code>? I am not happy about using <code>document.write</code> after reading <a href="http://stackoverflow.com/questions/802854/why-is-document-write-considered-a-bad-practice">this</a>.</p>

<p>I am aware that I could alternatively do this:</p>

<pre><code>&lt;span id="container"&gt;&lt;/span&gt;
&lt;script type="text/javascript"&gt;
    $("#container").text("foo");
&lt;/script&gt;
</code></pre>

<p>However, I'm interested to see if there's a way to do it without using a container element, preferably using jQuery.</p>

<p>Thanks in advance!</p>
