var type = xml.getElementsByTagName("Type");
            if (type.length > 0) {
                var typeValue = type[0];
                var value = typeValue.firstChild.nodeValue;
               
                if (value == "nodata") {
                    alert("没有数据,请联系管理员!");
                   typeValue.SetAttribute("Type","data");//这里要删除接点或修改怎么做
                       
                }
            }

解决方案 »

  1.   

    typeValue.parentNode.removeChild(typeValue);
      

  2.   

    var newNode = document.createElement("Type");
    ...//修改
    typeValue.parentNode.replaceChild(newNode,typeValue);
      

  3.   

    偶ALERT了下,为OBJECT没有删除啊
      

  4.   

    删除 removeChild()
    修改的话你可以先删除节点再重新创建这个节点
      

  5.   

    还是不行,不管当前结果是否为空只要有一次为空就会每次返回alert("没有数据,请联系管理员!");
    能给个详细的代码吗
    这个是偶的帮看看:
    xh传近来的参数
    if (xh != null && xh.readyState == 4 && xh.status == 200) {
                var xml = xh.responseXML;     
                var type = xml.getElementsByTagName("Type");
                if (type.length > 0) {
                    var typeValue = type[0];
                    var value = typeValue.firstChild.nodeValue;
                  
                    if (value == "nodata") {
                        alert("没有数据,请联系管理员!");
                       typeValue.parentNode.removeChild(typeValue);//这里要删除接点
                           
                    }
                }