Ajax - XMLHTTP实例
url:http://localhost/index.htm
<html> <head> <title>Ajax</title> <script type="text/javascript"> function LoadContent() { var x; x = new ActiveXObject("Microsoft.XMLHTTP"); x.onreadystatechange = function () { document.getElementById("div1").innerHTML = x.responsetext; ; } x.open("GET","http://www.liveinau.com/migrate/2606.html",true); x.send(); } </script> </head> <body> <form> <input id="Button1" type="button" value="button" onclick="LoadContent()"/> </form> <br /> <div id="div1">占位符</div> </body> </html>