ITPub博客

首页 > IT职业 > IT图书 > jquery-table

jquery-table

IT图书 作者:coyan 时间:2021-09-09 10:02:02 0 删除 编辑

获取table中选中一行的一个单元格的值

var id = $('input:checked').val();alert($('input:checked').parent().parent().index());var row=$('input:checked').parent().parent().index();var str=document.getElementById("table1").rows[row+1].cells[5].innerText;alert(str);

 

innerText对火狐失效,改用innerHTML,所有浏览器都支持

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2236/viewspace-2815432/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-07-11

  • 博文量
    271
  • 访问量
    16171