person.htm: 复system代码 代码如下: <본문> <br>var xmlDoc=null; <br>if (window.ActiveXObject) <br>{ <br>// for IE <br>xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); <br>} <br>else if (document.implementation.createDocument) <br>{ <br>//Mozilla, Firefox, Opera의 경우 <br>xmlDoc=document.implementation.createDocument("","",null ); <br>} <br>else <br>{ <br>alert('브라우저에서 이 스크립트를 처리할 수 없습니다.'); <br>} <br>if (xmlDoc!=null) <br>{ <br>xmlDoc.async=false; <br>xmlDoc.load("person.xml"); <br>document.write("<table border='1'>"); <br>var x=xmlDoc.getElementsByTagName("사람"); <br>for (i=0;i<x.length>{ <br>document.write("<tr>"); <br>document.write("<td>"); <br>document.write( <br>x[i].getElementsByTagName("myname")[0].childNodes[0].nodeValue); <br>document.write("</td>"); <br>document.write("<td>"); <br>document.write( <br>x[i].getElementsByTagName("myid")[0].childNodes[0].nodeValue); <br>document.write("</td>"); <br>document.write("</tr>"); <br>} <br>document.write("</table>"); <br>} <br>