美好的一天,我在添加按钮,下拉列表,文本框,在动态表中复制特定行和隐藏特定行时遇到问题。
对于表中重复的特定行,从 13 行到 17 行。
对于隐藏行,在第 4 行上。
我可以创建动态表,文本框在右列,但应该在左列。
以下是javascript:
function tableCreate() {
var body = document.body,
tbl = document.createElement('table');
txtbox = document.createElement('input');
tbl.style.width = '350px';
tbl.style.border = '1px solid black';
for(var ix = 0; ix < 17; ix++){ // this loop will create 17 row
var tr = tbl.insertRow();
var td = tr.insertCell();
td.style.border = '1px solid black';
td.appendChild(document.createElement('input')); //create textbox here
}
body.appendChild(tbl);
}
预期结果:
表格右侧:文字|表格左侧:文本框
表格右侧:文字|表格左侧:下拉列表
表格右侧:文字|表格左侧:特定行的重复按钮