How can I get the generated HTML from dynamically-inserted elements?
<p>I use JQuery to create a dynamic button, when I browse the source code of the webpage, what I see is still JQuery code, such as <code>$("&lt;input&gt;", { "id": "myid", "type"...</code>
I hope to see generated button code such as <code>&lt;input id="Button1" type="button" value="button" /&gt;</code>
How can I do?</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;  
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;  
&lt;head&gt;  
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;  
&lt;title&gt;&lt;/title&gt;  
&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
        $("&lt;input&gt;", { "id": "myid", "type": "button", "value": "Confirm", "name": "comfire" }).appendTo("#tablemsgbox");
        $("#myid").click(function () {
            alert($(this).val());
        });
    });  
&lt;/script&gt;
&lt;/head&gt;  

&lt;body&gt;
    &lt;input id="Button1" type="button" value="button" /&gt;
    &lt;div id="tablemsgbox"&gt;
    &lt;/div&gt;
&lt;/body&gt;  
&lt;/html&gt;  
</code></pre>
