Javascript fire bug表示HierarchyRequestError:无法在层次结构中的指定点插入节点
尝试附加2(td)s一个仅包含文本,另一个包含文本区域,但出现此错误HierarchyRequestError:无法在层次结构中的指定点插入节点。appendChild(tr)代码>曼莎夫人LOLZ/@SalmanAJavascript fire bug表示HierarchyRequestError:无法在层次结构中的指定点插入节点,javascript,html,Javascript,Html,尝试附加2(td)s一个仅包含文本,另一个包含文本区域,但出现此错误HierarchyRequestError:无法在层次结构中的指定点插入节点。appendChild(tr)曼莎夫人LOLZ/@SalmanA document.getElementById('customerName').onchange =function(){ if( document.getElementById('customerName').value == 0){ d
document.getElementById('customerName').onchange =function(){
if( document.getElementById('customerName').value == 0){
document.getElementById('customer').removeAttribute('readonly','readonly');
var textArea = document.createElement('textarea');
textArea.setAttribute('name','address');
textArea.setAttribute('class','form-control');
var tr = document.createElement('tr');
var td = document.createElement('td');
var text = document.createTextNode('العنوان');
td.appendChild(text);
tr.appendChild(td);
td = document.createElement('td');
td.appendChild(textArea);
tr.appendChild(tr);
document.getElementById('customeBody').appendChild(tr);
}