ajax²»Äܶ¯Ì¬ÏÔʾxmlÀïµÄÊý¾Ý
×¢£º1.ÊÖ¶¯É¾³ýieÁÙʱÎļþºó¿ÉÒÔ»ñÈ¡ÐÂÊý¾Ý£»2.Ë¢ÐÂÒ³Ãæ²»ÄÜ»ñÈ¡ÐÂÊý¾Ý£»3.²»ÒªËµ¼ÓËæ»úÊýÔÚurlÉÏ£¬ÎÒ²»ÖªµÀ¾ßÌå¼ÓÔÚ
ÄÄÀÎÒÂÒÊÔÁËÒ²»¹ÊDz»ÐУ»4.Ï£ÍûµÃµ½µÄЧ¹ûÊǵã»÷¡°»ñÈ¡Êý¾Ý¡±ºó¿ÉÒÔÏÔʾxmlÀïµÄ×îÐÂÊý¾Ý£»5.ÕýÔڸϱÏÒµÉè¼Æ£¬Ê±¼ä½ô
ÆÈ£¬Çë¸ßÈËÖ¸µã£¡
<script type="text/javascript">
//ÉèÒ»¸ö±äÁ¿
var XMLHttpReq=false;
//´´½¨Ò»¸öXMLHttpRequest¶ÔÏó
function createXMLHttpRequest(){
if(window.XMLHttpRequest){ //Mozilla
XMLHttpReq=new XMLHttpRequest();
}
else if(window.ActiveXObject){
try{
XMLHttpReq=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
XMLHttpReq=new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}
}
}
//·¢ËÍÇëÇóº¯Êý
function send(url){
createXMLHttpRequest();
XMLHttpReq.open("GET",url,true);
XMLHttpReq.onreadystatechange=proce; //Ö¸¶¨ÏìÓ¦µÄº¯Êý
XMLHttpReq.send(null); //·¢ËÍÇëÇó
}
function proce(){
if(XMLHttpReq.readyState==4){ //¶ÔÏó״̬
if(XMLHttpReq.status==200){//ÐÅÏ¢Òѳɹ¦·µ»Ø£¬¿ªÊ¼´¦ÀíÐÅÏ¢
&nb
Ïà¹ØÎÊ´ð£º
ÎÒµÄÒ³ÃæÀïÓõÄAJAX¿Ø¼þ µ«Ò³Ãæ¾²Ö¹Ò»¶Îʱ¼ä¾Í»á³öÏÖÉÏÃæµÄÒ»¸ö´íÎóÊÇÔõô»áÊÂѽ Ôõô½â¾ö°¡
¸ßÊÖ°ï°ïæ°¡
½«ÏîÄ¿Éϼ¶Ä¿Â¼ÖеÄÖÐÎÄÃû³ÆÈ«²¿¸Ä³ÉÓ¢ÎÄ
Â¥ÉÏ˵µÄºÜÇå³þÁË¡£°ï¶¥Ò»Ï°É
Õâ¸öÎÊÌâ²»ÊǺܳ£ ......
ajaxÔõôʵÏÖÐÂÔöÏÂÀÁбíÎÞˢС£ÀàËÆ
http://hi.baidu.com/comasp/blog/item/aa34e736bfc269320a55a9ad.html¡£
»¹ÓÐÍøÒ×163Blog£¬Ìí¼Óblogʱ£¬Èç¹ûдµÄÎÄÕÂûÓкÏÊʵķÖÀà¿ÉÑ¡£¬¿ÉÒÔµã»÷Ìí¼ÓеÄÎÄÕÂÀàÐÍ£¬È»ºóÌ ......
´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet ......
Çë½ÌÒ»¸öÎÊÌâ
ÔÚÖ÷Ò³Ãæ(Ö÷¿ò¼ÜÒ³)Main.aspxÓÐÒ»¸ö·½·¨
check_SysState =0;
function checkSysConfig()
{
fnCheckFolder();//¼ ......