日期:2014-05-18 浏览次数:20459 次
function setButtonAction() { var table = document.getElementById('List').getElementsByTagName('Table')[0]; var rowsCount = table.rows.length; for (var i = 1; i < rowsCount; i++) { var row = table.rows[i]; var select = document.getElementById('List').getElementsByTagName('select')[2 * i - 2] select.onchange=function () { categoryChange(i,this.value) } row.cells[4].innerHTML = "<input name='BtDel' value='删除' class=\"Button1\" type='button' onclick=\"deleteRow('" + i + "')\"/>" } }