0
我有多個表,我有一個行添加到這些表的功能添加在同一個頁面多個錶行:動態使用一個功能
<table id="table1" style=" border-collapse: collapse;">
<tr id="table1row1">...
<tr id="table1row2">...
<table id="table2" style=" border-collapse: collapse;">
<tr id="table2row1">...
<tr id="table2row2">...
的問題是,當我添加行,而不是施捨的結果上面,我有這些樣的結果:
<table id="table1" style=" border-collapse: collapse;">
<tr id="table1row1">...
<tr id="table1row2">...
<table id="table2" style=" border-collapse: collapse;">
<tr id="table2row1">...
<tr id="table2row3">...
當我調用該函數的行添加到不同的表,它只是增加值
var thischannel=1;
var thisassignment=1;
var thisrow=1;
function addRow(list,table){
thisrow++;
if(something to place in this to point if this is a new table or the same table){
var thisrow=1;
}
}