您的位置:首页 > 其它

Jqyery根据行序号和列序号获取单元格

2016-03-22 16:34 337 查看
function getCellByRC(tableCon,rowIndex,colIndex){
var table = $(""+tableCon)[0];//获取第一个表格
var tr = $(table).find("tr")[rowIndex];//获取第rowIndex行
var td = $(tr).find("td")[colIndex];//获取第colIndex列
var text = $(td).text();
return text;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: