I am following this link:
Editable Table Jquery PHP with MYSQLi
and I have it going well for the most part, but I want my last row not editable. It's a row that sums the data above. Is there a quick fix to the code?
$(document).ready(function(){
$('#editable_table').Tabledit({
deleteButton: false,
editButton: false,
columns: {
identifier: [0, 'id'],
editable: [[1, 'name'], [2, 'gender'], [3, 'age'], [4, 'designation'], [5, 'address']]
},
hideIdentifier: true,
url: 'live_edit.php'
});
});
Update: Forgot to mention that user can add data to the table, so the last row is not a fixed number. I have found this code
Syntax: HTMLCollectionObject = table.rows;
lastRow = mytable.rows.item(mytable.rows.length-1);
but I'm not sure where/how to use it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…