日期:2014-05-16 浏览次数:20316 次
<html> <body> <script type="text/javascript"> xmlhttp=null; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); document.write("hell0,it's IE7+ <br>"); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); document.write("hell0,it's IE6"); } if(xmlhttp!=null) { xmlhttp.open("get","a.xml",false); } else { document.write("hell0,it's null"); } </script> </body> </html>