How to select and change value of table cell with jQuery?

后端 未结 6 742
春和景丽
春和景丽 2020-12-29 03:18

How do I change the content of the cell containing the \'c\' letter in the HTML sample using jQuery?



        
      
      
      
6条回答
  •  爱一瞬间的悲伤
    2020-12-29 03:49

    I wanted to change the column value in a specific row. Thanks to above answers and after some serching able to come up with below,

    var dataTable = $("#yourtableid");
    var rowNumber = 0;  
    var columnNumber= 2;   
    dataTable[0].rows[rowNumber].cells[columnNumber].innerHTML = 'New Content';
    

提交回复
热议问题