xmlHttpReq.open("GET", "http://localhost/books.xml", false); xmlHttpReq.send(); alert(xmlHttpReq.responseText); 在非IE的瀏覽器中,需要用new XMLHttpRequest()來創(chuàng)建對象,如下: var xmlHttpReq = new XMLHttpRequest(); xmlHttpReq.open("GET", "http://localhost/books.xml", false); ...
www.dbjr.com.cn/shouce/xmlhttp/xmlhttp/... 2025-5-21