测试好半天,才出来,checkbox在第一列,
for( i=1;i<document.all.GVmain.rows.length;i++)
{
var cb=document.all.GVmain.rows(i).cells(0).children(0);
if(cb.checked)
{
temp0=document.all.GVmain.rows(i).cells(1).innerText;
temp1=document.all.GVmain.rows(i).cells(5).innerText;
temp2=document.all.GVmain.rows(i).cells(6).innerText;
}
}
for( i=1;i<document.all.GVmain.rows.length;i++)
{
var cb=document.all.GVmain.rows(i).cells(0).children(0);
if(cb.checked)
{
temp0=document.all.GVmain.rows(i).cells(1).innerText;
temp1=document.all.GVmain.rows(i).cells(5).innerText;
temp2=document.all.GVmain.rows(i).cells(6).innerText;
}
}
本文介绍了一段用于从表格中筛选被选中项的数据的JavaScript脚本。此脚本通过遍历表格行来查找被选中的复选框,并获取对应行的特定列数据,如文本信息等。

被折叠的 条评论
为什么被折叠?



