inject JS code into a textarea
<p>I am trying to show some JS code in a textarea. The code is generated with JS so I am injecting it into the textarea with JS. However, using the <code>&lt;script&gt;</code> tags, causes the script to execute. I thought using <code>&amp;lt;</code> would solve this, but this is simply displaying <code>&amp;lt;</code> instead of <code>&lt;</code>.</p>

<p>Any suggestions how I can do this?</p>

<pre><code>$('myTextarea').set('value', '&lt;script&gt;alert('do something');&lt;/script&gt;');
</code></pre>
