jquery set input val() and return the parent html() get empty input?
<p>i make a function to input some field and return the html to show:</p>

<pre><code>function get_goodinput(GoodsSn, InCount, SellCount, Barcode, SinglePrice, BatchNo) {
        var $c = $('#t_addgoods_table').clone();
        $c.children("form").attr("id", "addgoods_form"); //id="t_addgoods_table"

        var $f = $c.children("form");

        $f.find("input[name='BatchNo']").val(BatchNo);
        $f.find("input[name='SinglePrice']").val(SinglePrice);
        $f.find("input[name='Barcode']").val(Barcode);
        $f.find("input[name='SellCount']").val("sssssssssssssssssssssss");
        alert($f.find("input[name='SellCount']").val());
        //this step can get the val..


        $f.find("input[name='InCount']").val(InCount);
        $f.find("select[name='GoodsSn']").val(GoodsSn);

        return $c.html();

    }
</code></pre>

<p>and show in the <a href="http://metroui.org.ua/dialog.php" rel="nofollow">metroUI dialog</a>  </p>

<pre><code> $('#addgoods').click(function (e) {
     $.Dialog({
     'title' : '添加商品',
      'content' : get_goodinput("aaa", "aaa", "", "12", "12312", "aaaaa"),
                'draggable' : true,
                'buttonsAlign' : 'right',
                'closeButton' : true,
                'position' : {
                    'zone' : 'center',
                    'offsetY' : 100
                },
                'buttons' : {
                    '确定' : {
                        'action' : function () {
</code></pre>

<p>but i always get the empty input...why???
<img src="http://i.stack.imgur.com/PudI4.png" alt="enter image description here"></p>

<p>the html code:= =
<img src="http://i.stack.imgur.com/vW7xT.png" alt="enter image description here"></p>
