Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

½â¾öajax»º´æÎÊÌâ(ת)

AjaxÌí¼ÓÊý¾ÝÖ®ºó£¬Ë¢ÐÂǰ̨ҳÃ棬Êý¾ÝûÓб仯¡£
Ö»ÓÐÖØÐÂÕÒ¿ªIEÔÙÊäÈëµØÖ·£¬²ÅÄÜ¿´µ½Ð§¹û¡£
ÒÔÉÏÕâЩÊDz»ÊÇ»º´æµÄÔ­Òò°¡£¿Ôõô½â¾ö£¿
ajax»º´æÎÊÌâ½â¾ö;¾¶£º
1.ÔÚAJAXÇëÇóµÄÒ³Ãæºó¼Ó¸öËæ»úº¯Êý,ÎÒÃÇ¿ÉÒÔʹÓÃËæ»úʱ¼äº¯Êý
 
      ¼Óʱ¼ä´Á var url = BaseURL + "&timeStamp=" + new Date().getTime();
      »òÕß
     ¼ÓËæ»úÊý var url = BaseURL + "&r=" + Math.random();
2.ÔÚXMLHttpRequest·¢ËÍÇëÇó֮ǰ¼ÓÉÏXMLHttpRequest.setRequestHeader("If-Modified-Since","0")
 
      XMLHttpReq.open("GET", url, true);
      XMLHttpReq.setRequestHeader("If-Modified-Since","0"); 
      XMLHttpReq.onreadystatechange = processResponse;      
      XMLHttpReq.send(null);   
 
 
 
µÚ¶þÖÖ·½·¨¸Ð¾õͦºÃ


Ïà¹ØÎĵµ£º

XMLHttpRequest Ajax ʵÀý¼ò½é

Ò»¡¢XMLHttpRequest ¶ÔÏóµÄ·½·¨ÓëÊôÐÔ
·½    ·¨
Ãè    Êö
abort()
Í£Ö¹µ±Ç°ÇëÇó
getAllResponseHeaders()
°ÑHTTPÇëÇóµÄËùÓÐÏìÓ¦Êײ¿×÷Ϊ¼ü/Öµ¶Ô·µ»Ø
getResponseHeader("header")
·µ»ØÖ¸¶¨Êײ¿µÄ´®Öµ
open("method", "url")
½¨Á¢¶Ô·þÎñÆ÷µÄµ÷Óá£method²ÎÊý¿ÉÒÔÊÇGET¡¢POST»òPUT¡£ ......

Ajax¼òµ¥ÊµÀý

Ajax£¬Òì²½JavaScriptÓëXML£¬ÊÇʹÓÿͻ§¶Ë½Å±¾ÓëWeb·þÎñÆ÷½»»»Êý¾ÝµÄWebÓ¦Óÿª·¢·½·¨¡£ÕâÑù£¬WebÒ³Ãæ²»Óôò¶Ï½»»¥Á÷³Ì½øÐÐÖØмӲ㬾ͿÉÒÔ¶¯Ì¬µØ¸üС£Ê¹ÓÃAjax£¬Äã¿ÉÒÔ´´½¨½Ó½ü±¾µØ×ÀÃæÓ¦Óõģ¬Ö±½ÓµÄ¡¢¸ß¿ÉÓõġ¢¸ü·á¸»µÄ¡¢¸ü¶¯Ì¬µÄWebÓû§½Ó¿Ú½çÃæ¡£
Ajax´¦Àí¹ý³Ì
Ò»¸öAjax½»»¥´ÓÒ»¸ö³ÆΪXMLHttpRequestµÄJavaScript ......

ASP.NET AJAX ÖУ¬Óà JavaScript µ÷Ó÷þÎñÆ÷¶ËµÄ·½·¨

ÕâÀï²»ÊÇÖ¸µ÷Óüòµ¥µÄ PageMethod£¬ÒòΪ¾²Ì¬·½·¨ÊDz»ÄܲÙ×÷µ±Ç°Ò³ÃæµÄ¿Ø¼þµÄ£¬ËùÒÔ¾²Ì¬µÄ PageMethod ×÷Óþ͸úÆÕͨµÄ WebService Ò»Ñù£¬±È½Ï¾ÖÏÞ¡£
ÄÇô£¬µ÷ÓÃÒ»°ãµÄ·þÎñÆ÷¶Ë·½·¨£¬Æäʵ¾ÍÊÇ·¢ÆðÒ»¸öÒì²½»Øµ÷¡£×î¼òµ¥µÄʵÏÖ°ì·¨£¬ÊÇͨ¹ý UpdatePanel À´×ö¡£
Ê×Ïȶ¨ÒåÒ»¸öÒþ²ØµÄ LinkButton£¬ÔÚÆä´¦ÀíʼþÖУ¬È¥µ÷ÓÃÎÒÃÇÒªÖ ......

×î¼òµ¥µÄ ajax Loading Ч¹û

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
          <ContentTemplate>
        <asp:GridView ID="GvPubList" runat="server" AutoGenerateColumns="False"
        ......

AJAX ¿â API


ʲôÊÇ AJAX ¿â API£¿
AJAX ¿â API ÊÇÒ»ÖÖÄÚÈÝ·Ö²¼ÍøÂ磬¿ÉÔØÈë×îÊÜ»¶Ó­µÄ¿ªÔ´ JavaScript ¿âµÄ¼Ü¹¹¡£Í¨¹ýʹÓà Google AJAX API ÔØÈë³ÌÐòµÄ google.load() ·½·¨£¬ÄúµÄÓ¦ÓóÌÐòÄܹ»Ñ¸ËÙ´ÓÈ«ÇòÈκÎλÖ÷ÃÎʲ»¶ÏÔö³¤µÄ¡¢×îÊÜ»¶Ó­µÄ¿ªÔ´ JavaScript ¿âÁÐ±í£¬°üÀ¨£º
jQuery
jQuery UI
Prototype
script.aculo.us
Mo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ