问题描述
<SCRIPTlanguage="JavaScript">varxmlDOM=newActiveXObject("Microsoft.XMLDOM")xmlDOM.async="false"xmlDOM.load("communication.xml")varcurNode=xmlDOM.documentElement.childNodesvarii=1for(varz=0;z<curNode.length;z++){cur=curNode.item(z).childNodesdocument.write("<TR>")for(vari=0;i<6;i++){document.write("<TD>"+cur.item(i).text+"</TD>")}document.write("<TD>"+ii+"</TD>")ii++;document.write("</TR>")}functiondel(){varx=xmlDOM.documentElementvare=xmlDOM.documentElement.childNodesx=e.removeChild(e.item(t1.value))xmlDOM.save("communication.xml")alert('删除成功,请点击刷新查看结果!')}</SCRIPT>
时间: 2024-09-11 17:00:41