JQuery / JS variable to alert text
<p>I have this code:</p>

<pre><code>$('#output').html("&lt;strong&gt;id:&lt;/strong&gt;"+id);
</code></pre>

<p>then</p>

<pre><code>&lt;div id="output"&gt;this element will be accessed by jquery and this text replaced&lt;/div&gt;
</code></pre>

<p>The above works fine but what I need is for the output to go into an alert so....</p>

<pre><code>&lt;a href="#" onclick="alert('OUTPUT GOES HERE')"&gt;Alert Me&lt;/a&gt;  &lt;- See here
</code></pre>

<p>How can this be done?</p>
