我正在处理一张桌子,我需要处理当前行和下一行。我的功能如下所示:
function test(row) {
alert(row.id); //it gives me the current row id, it works.
nextrow = row.nextSibling.nextSibling; //not sure why, but i have to use it twice to get the right one.
alert(nextrow.id); //this gives me the next row's id, also works.
alert(row.id); //this also gives me the next row's id...it should give me the current one.
}
任何想法,如果我可以将实际对象存储在某个地方,这样它就不会改变?谢谢你。