How to find rowindex when clicked a button in table
Try this:
$("table tr input").on('click', function(e){
alert($(this).closest('td').parent()[0].sectionRowIndex);
});
FIDDLE
You don't need ID
$('table').on('click', 'input[value="Remove"]', function(){
$(this).closest('tr').remove();
});
Try using this: http://jsfiddle.net/jd9N4/1/
var elem = $('input[type="button"]');
$(elem).click(function() {
alert($(this).closest('tr').index());
$(this).closest('tr').remove();
});
IF you are adding row dynamically you can
$(document).on('click', 'button', function () {
var indexRow = this.parentNode.parentNode.rowIndex;
document.getElementById("table-name").deleteRow(indexRow);
});