delete last row in table
<p>i got a simple question, i want to delete last row in a table, i copied one function that delete the checked one though:</p>

<pre><code>function deleterow(tableID) {
    try {
    var table = document.getElementById(tableID);
    var rowCount = table.rows.length;

    for(var i=1; i&lt;rowCount; i++) {
        var row = table.rows[i];
        var chkbox = row.cells[0].childNodes[0];
        if(null != chkbox &amp;&amp; true == chkbox.checked) {
            table.deleteRow(row);
            rowCount--;
            i--;
        }
    }
    }catch(e) {
        alert(e);
    }
}
</code></pre>

<p>how do i change it, so that it will delete only the last one, for each time i use this function?! thank you all for the help! i really appreciate it!</p>
