Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/401.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript fire bug表示HierarchyRequestError:无法在层次结构中的指定点插入节点_Javascript_Html - Fatal编程技术网

Javascript fire bug表示HierarchyRequestError:无法在层次结构中的指定点插入节点

Javascript 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

尝试附加2(td)s一个仅包含文本,另一个包含文本区域,但出现此错误HierarchyRequestError:无法在层次结构中的指定点插入节点。appendChild(tr)曼莎夫人LOLZ/@SalmanA
    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);


        }