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

AjaxÖÐÇëÇó±»»º´æµÄÎÊÌâ

½ñÌì¸ãÁËÎÒÈýËĸöСʱµÄÎÊÌ⣬ÖÕÓÚÕÒµ½½â¾ö·½°¸ÁË¡£¹þ¹þ¡£
ÔÚAjax¿ª·¢ÖУ¬»áÓöµ½ä¯ÀÀÆ÷»º´æÄÚÈݵÄÎÊÌ⣬±ÈÈ磬ij¸öÔªËØ×¢²áÁËÊó±êʼþ£¨onmouseover£©£¬Ê¼þ´¥·¢ºó»áͨ¹ýxmlhttprequestµ½·þÎñÆ÷»ñÈ¡ÄÚÈÝ£¬ÔÚ²»Ë¢ÐÂÒ³ÃæµÄÇé¿öÏ£¬ä¯ÀÀÆ÷»á»º´æµÚÒ»´ÎÇëÇóµÄÄÚÈÝ£¬·þÎñ¶Ë¸üкóä¯ÀÀÆ÷ÈÔÈ»ÏÔʾµÚÒ»´ÎµÄÄÚÈÝ¡£
ͨ³££¬ÕâÖÖÇëÇó¶¼ÊÇxmlhttprequest·¢ÆðµÄGETÇëÇ󡣸ù¾Ý HTTP ¹æ·¶£¬GET ÓÃÓÚÐÅÏ¢»ñÈ¡£¬¶øÇÒÓ¦¸ÃÊÇÃݵȵġ£Ò²¾ÍÊÇ˵£¬µ±Ê¹ÓÃÏàͬµÄURLÖظ´GETÇëÇó»á·µ»ØÔ¤ÆÚµÄÏàͬ½á¹ûʱ£¬GET·½·¨²ÅÊÇÊÊÓõġ£µ±¶ÔÒ»¸öÇëÇóÓи±×÷ÓõÄʱºò£¨ÀýÈ磬Ìá½»Êý¾Ý×¢²áÐÂÓû§Ê±£©£¬Ó¦¸ÃʹÓÃPOSTÇëÇó¶ø²»ÊÇGET¡£ËùÒÔä¯ÀÀÆ÷»á¶ÔGETÇëÇó×ö»º´æ´¦Àí¡£
½â¾ö°ì·¨£º
Ò». GETÇëÇóURLºó¸½¼Ó×Ö´®£¬È÷þÎñÆ÷ÈÏΪ²»ÊÇÏàͬµÄÇëÇó¡£
Àý “http://www.example.com/index.php?class=aitcle&page=5&_t=” + new Date().getTime()
¶þ. ÔÚajax·¢ËÍÇëÇóÇ°¼ÓÉÏ xmlHttpRequest.setRequestHeader(”If-Modified-Since”,”0″)
Èý. ÔÚajax·¢ËÍÇëÇóÇ°¼ÓÉÏ xmlHttpRequest.setRequestHeader(”Cache-Control”,”no-cache”);
ËÄ. ·þÎñ¶ËÏìÓ¦ÇëÇóʱ¼Ó header(”Cache-Control: no-cache, must-revalidate”); £¨PHP£©
Îå. ʹÓÃPOST´úÌæGET£¬ä¯ÀÀÆ÷²»»á¶ÔPOST×ö»º´æ
¸½Â¼£º
RFC1945ÖеÄÓ¢ÎÄÔ­ÎÄÈçÏ£º
8.1 GET
The GET method means retrieve whatever information (in the form of an
entity) is identified by the Request-URI. If the Request-URI refers
to a data-producing process, it is the produced data which shall be
returned as the entity in the response and not the source text of the
process, unless that text happens to be the output of the process.
The semantics of the GET method changes to a “conditional GET” if the
request message includes an If-Modified-Since header field. A
conditional GET method requests that the identified resource be
transferred only if it has been modified since the date given by the
If-Modified-Since header, as described in Section 10.9. The
conditional GET method is intended to reduce network usage by
allowing cached entities to be refreshed without requiring multiple
requests or trans


Ïà¹ØÎĵµ£º

AJAXÖÐÎÄÎÊÌâ[ת]

AJAXÖÐÎÄÎÊÌâ·ÖΪÁ½´óÀࣺ
1£©·¢ËÍ·¾¶ÖеIJÎÊýÓÐÖÐÎÄ£¬ÔÚ·þÎñÆ÷¶Î½ÓÊÕ²ÎÊýÖµÊÇÂÒÂë
ÀýÈ磺
var url="a.jsp?name=СÀî"£»
xmlHTTP.open ("post",url,true);
½â¾ö°ì·¨£º
ÀûÓÃjavascriptµÄÌṩµÄescape()»òencodeURI()·½·¨
ÀýÈ磺
¿Í»§¶Ë£º
var url="a.jsp?name=СÀî"£»
url=encode ......

JavaScript ¼òµ¥Àí½âAjaxÒì²½µ÷ÓòÙ×÷

JavaScript ¼òµ¥Àí½âAjaxÒì²½µ÷ÓòÙ×÷µÄÎÄÕ¡£
ÎÄÕµØÖ·£ºhttp://www.soaspx.com/dotnet/ajax/javascript/javascript_20090915_349.html
ÕâƪÎÄÕÂÊÇÀí½âAjax¼¼ÊõµÄ¼òµ¥Àý³Ì£¬Í¦¼òÃ÷¶óÒª£¬ºÜÈÝÒ×Àí½â¡£
AjaxÌṩÓë·þÎñÆ÷Ò첽ͨÐŵÄÄÜÁ¦£¬½èÖúÓÚAjax£¬¿ÉÒÔÔÚÓû§µ¥»÷°´Å¥Ê±£¬Ê¹ÓÃJavaScriptºÍ DHTMLÁ¢¼´¸üÐÂUI£¬²¢Ïò·þÎñÆ÷ ......

jquery+ajax+json+asp.netѧϰ±Ê¼Ç£¨Ò»£©

jqueryÖÐÒѾ­·â×°ÁËajaxµÄ¹ý³Ì£¬Ê¹ÓÃÆðÀ´ºÜ¼òµ¥£º
ͨ¹ýget·½Ê½Ìá½»£º
<html>
<head>
    <title>ʵÏÖ·þÎñÆ÷ʱ¼äʵʱ±ä»¯</title>
    <script language="javascript" type="text/javascript" src="js/jquery-1.3.1.js"></script>
  & ......

Ö´ÐÐAJAX·µ»ØHTMLƬ¶ÎÖеÄJavaScript½Å±¾

Èç¹ûAJAX¼ÓÔصÄÊý¾ÝÊÇÒ»¸öHTMLƬ¶Î£¬¶øÇÒÕâ¸öHTMLƬ¶Î»¹°üº¬½Å±¾<script>¿é£¬ÄÇôÔÚÄã°ÑÕâÊý¾ÝxmlHttp.responseTextÓÃinnerHTML·½·¨²åÈëµ½µ±Ç°ÎĵµÒ»¸öÔªËØÖУ¬Äã»á·¢ÏÖAJAX¼ÓÔØ»ØÀ´µÄ½Å±¾¸ù±¾Ã»ÓÐÖ´ÐС£ÕâÊÇAJAX¿ª·¢Öкܳ£¼ûµÄÎÊÌ⣬Èç¹ûÄã²»ÊÇÒ»Ö±ÔÚÓÃJavaScript¿ò¼Ü×ö¿ª·¢£¬ÏàÐÅÄãÔç¾Í·¢ÏÖÕâ¸öÎÊÌâÁË¡£±¾ÎÄ·ÖÎöÁËÁ ......

AJAX±íµ¥Ìá½»·½·¨£¨JSON£©

AJAX±íµ¥Ìá½»·½·¨£¨JSON£©
1./*****JAVA**************************************************************/
JAVAÀàÖУº
 
/*****JAVA**************************************************************/
2./*****struts.xml**************************************************************/
struts.xmlÎļþÖУº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ