javascript - I want add a row a specific postion -
i want add row specific postion. , have row id example have table in table rows have 1 button when click on buttton row become instered below button click row
asp.net mvc code
<%for = 0 9%> <tr> <td><input type="button" value="<%:i.tostring %>" onclick ="alert('<%:i.tostring %>')" /></td> <td>hhhhhhhhhhhhhhhhhhhh</td> <td>wwwwwwwwwwwwwwwwwwwwwwwww</td> </tr> <%next %>
var x = '<tr><td>new row</td></tr>' $('#button').live('click', function() { var parenttr = $(this).closest('tr'); $(x).insertbefore(parenttr); })
Comments
Post a Comment