jquery-table

时间:2014-06-25 06:21:50   收藏:0   阅读:281

获取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,所有浏览器都支持

本文出自 “东方小阁” 博客,请务必保留此出处http://lailai.blog.51cto.com/3362373/1430286

jquery-table,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!