开发者

How to get the AddRowTable values

I am using jQuery to add the values in the table Using AddrowPlugin. I need to get the dynamic values of Row1, Row2, Row3, etc.

My Code

Enter code here

<script type="text/javascript">
    $("document").ready(function(){
        $(".addComment").btnAddRow({rowNumColumn:"rowNumber"});
        $(".delRow").btnDelRow();
    });
</script>

<table border="1" class="autoTable">
    <tr><td>Your Name</td>
        <td>Your Age</td><td> </td>
    </tr>
    <tr><td>
            <input type="text" id="one" size="25"/>
        </td>
        <td><input type="text" "two" size="25"/>
        </td>
        <td><input type="button" value="Delete" class="delRow"/>
        </td>
    </tr>
    开发者_运维百科<tr>
        <td>
        </td>
        <td>
            <input type="button" class="addComment" value="submit"/>
        </td>
    </tr>
</table>

Here I get a dynamic column of "one" inputfield and "two" input field submit. How do I extract the "one" value & "two" for all dynamic rows?


$(".addComment").btnAddRow({inputBoxAutoNumber:true}, function(row){
    if(row)
        var t = $("input[name=one1]").val();
    var t2 = $("input[name=one2]").val();

    // Retrieves the one field as I set the default inputBoxAutoNumber:
    //   true, it keeps on increments as it adds.
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜