1. 程式人生 > >js操作table

js操作table

success tab log table ota ucc ldr pda ble

function updatHost(obj) {
  
    var tdObj = $(obj).parents(‘tr‘).children(‘td‘); 
    var host_id = tdObj[0].innerHTML;
    var domitory_name = tdObj[1].innerHTML;
    var host_name = tdObj[2].innerHTML;
    var lived_number = tdObj[3].innerHTML;
    var total_number = tdObj[4].innerHTML;
 

}

<td><a class="label label-success" href="javascript:void(0)" onclick="updatHost(this)" id="updateBtn">修改</a></td>

  

js操作table