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
Ïà¹ØÎĵµ£º
ÔÚweb.configÖÐÐÞ¸ÄÐÞ¸ÄÊôÐÔ
1£º<configSections><configSections>ÖмÓÏÂÃæ´úÂë
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral ......
jqueryͨ¹ýpost´«µÝÊý¾Ýµ½·þÎñÆ÷£¨²»Ê¹Óòå¼þ£©£º
<html>
<head>
<title>Untitled Page</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.3.1.js"></script>
<script language="ja ......
jQueryÓÉÃÀ¹úÈËJohn Resig´´½¨£¬ÖÁ½ñÒÑÎüÒýÁËÀ´×ÔÊÀ½ç¸÷µØµÄÖÚ¶àjavascript¸ßÊÖ¼ÓÈëÆäteam£¬°üÀ¨À´×Ե¹úµÄJörn Zaefferer£¬ÂÞÂíÄáÑǵÄStefan PetreµÈµÈ¡£
¡¡¡¡jQueryÊǼÌprototypeÖ®ºóÓÖÒ»¸öÓÅÐãµÄJavascrīpt¿ò¼Ü¡£Æä×ÚÖ¼ÊÇ——WRITE LESS,DO MORE,д¸üÉٵĴúÂë,×ö¸ü¶àµÄÊÂÇé¡£
¡¡¡¡ËüÊÇÇáÁ¿¼¶µÄjs¿ ......
<scrīpt Language="Javascrīpt">
<!--
// author:±¼ÌÚµÄÐÄ
// qq:7180001
function Ajax(OnError,OnState,OnDownloadEnd)
{
this.ErrorStr = null;
......