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

ajax ÖÐÎÄÂÒÂë

½â¾öAjax´«ËÍÖÐÎĻᵼÖÂÂÒÂëµÄÎÊÌâ
//Èç¹û´«ËͲÎÊýÊÇÖ±½Ó¸³ÓèµÄ£¬¾Í»á²úÉúÂÒÂë!
http_request.open("POST",url,true);
http_request.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');
http_request.send("action="+strName+"&val="+val);  
//Èç¹ûvalµÄֵΪÖÐÎÄ£¬Ôò²úÉúÂÒÂë
//½â¾ö·½·¨ºÜ¼òµ¥£ºÊ¹ÓÃjavascriptÖеÄescape(string)
º¯Êý
http_request.open("POST",url,true);
http_request.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');
http_request.send("action="+strName+"&val="+escape(val));  
//valµÄֵΪÖÐÎIJ»»á²úÉúÂÒÂë
encodeURI(encodeURI(post)); ÕâÑùÒ²¿ÉÒÔ
¹ØÓÚÔÚAjaxÖÐGET»ØµÄResponseTextÖÐÎÄÂÒÂëµÄ×î¼ò½â¾ö°ì·¨
ÓÃAjax
À´GET»ØÒ»¸öÒ³Ãæʱ£¬RESPONSETEXTÀïÃæµÄÖÐÎĶà°ë»á³öÏÖÂÒÂ룬ÕâÊÇÒòΪxmlhttpÔÚ´¦Àí·µ»ØµÄresponseTextµÄʱºò£¬ÊÇ°Ñ
resposeBody°´UTF-8±àÂë½ø½âÂ뿼Ðγɵģ¬Èç¹û·þÎñÆ÷ËͳöµÄȷʵÊÇUTF-8µÄÊý¾ÝÁ÷µÄʱºòºº×Ö»áÕýÈ·ÏÔʾ£¬¶øËͳöÁËGBK±àÂëÁ÷µÄʱºò¾ÍÂÒÁË¡£½â¾öµÄ°ì·¨¾ÍÊÇÔÚËͳöµÄÁ÷ÀïÃæ¼ÓÒ»¸öHEADER£¬Ö¸Ã÷ËͳöµÄÊÇʲô±àÂëÁ÷£¬ÕâÑùXMLHTTP¾Í²»»áÂÒ¸ãÁË¡£
PHP:header('Content-Type:text/html;charset=GB2312');
ASP:Response.Charset("GB2312")
JSP:response.setHeader("Charset","GB2312");


Ïà¹ØÎĵµ£º

DWR AJAX¸ü·½±ã

¸½springÕûºÏDWR(°üº¬struts1,spring,hibernateÕûºÏÖÃ):
http://blog.csdn.net/jiabeis/archive/2010/05/26/5626121.aspx
×î½üÁ˽âÁËÒ»¸öÓÐÓõÄAJAX¹¤¾ß£¬¿´ÁËÍøÉϵÄÎÄÕÂÕâÀïÓÐһЩժ³­ºÍ×Ô¼ºµÄ×ܽᣬºÍ´ó¼Ò·ÖÏí£º
ʲôÊÇDWR(Direct Web Remote)£¿
DWRÊÇÒ»ÖÖAJAX½â¾ö·½°¸£¡
DWR°üÀ¨Ò»¸öjava¿â£¬ÒÔ¼°Ò»Ì×javascript£¬Ê¹ ......

ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ¡£

ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ
Ô­±¾ÒÔΪÓÃÕâÖÖ·½Ê½£¬°Ñ´Ë·½·¨·Åµ½Ò»¸öHttphandlerÖУ¬È»ºó´ÓJAVASCRIPT·ÃÎÊHttphandlerÀ´ÊµÏÖÎÞˢеÄÎļþÉÏ´«¡£Ã»Ïëµ½£¬ÕâÑùͬÑùÊDz»Ðеģ¬Ö»ÄÜÔÚ±¾»ú²âÊÔͨ¹ý£¬Èç¹û·Åµ½ÍøÉÏ£¬»òÕß´ÓÆäËûµØ·½·ÃÎʾͻáÌáʾÎÞ·¨ÕÒµ½Îļþ£¬¿É¼ûÔÚASP.NETÖÐËüÖ»ÄÜÓÃÓÚÉÏ´«·þÎñÆ÷¶ËµÄÎļþ¡£ 
֮ǰÔÚÍøÕ¾Ò²Ë ......

ajax»º´æÎÊÌâ½â¾ö;¾¶

ÎÒÓÃPHPºÍAjax½áºÏ£¬Ìí¼ÓÊý¾ÝÖ®ºó£¬Ë¢ÐÂǰ̨ҳÃ棬Êý¾ÝûÓб仯¡£
ÎҸĶ¯PHP¶¯Ì¬½Å±¾£¬Ö»ÓÐÖØÐÂÕÒ¿ªIEÔÙÊäÈëµØÖ·£¬²ÅÄÜ¿´µ½Ð§¹û¡£
ÒÔÉÏÕâЩÊDz»ÊÇ»º´æµÄÔ­Òò°¡£¿Ôõô½â¾ö£¿
ajax»º´æÎÊÌâ½â¾ö;¾¶£º
ÊÇ»º´æµÄÎÊÌâ¡£
ÔÚ·þÎñ¶Ë¼Ó header("Cache-Control: no-cache, must-revalidate");
²¢ÇÒÔÚÄãµÄJSÌá½»²ÎÊýÖмÓËæ»ú» ......

¹ØÓÚAJAXÒì²½£¨À´×ÔÍøÂ磩

Web 2.0 һƳ
ÔÚÉîÈëÑо¿´úÂë֮ǰÊ×ÏÈ¿´¿´×î½üµÄ¹Ûµã —— Ò»¶¨ÒªÊ®·ÖÇå³þ Web 2.0 Õâ¸ö¸ÅÄî¡£Ìýµ½ Web 2.0 Õâ¸ö´ÊµÄʱºò£¬Ó¦¸ÃÊ×ÏÈÎÊÒ»ÎÊ “Web 1.0 ÊÇʲô£¿” ËäÈ»ºÜÉÙÌýÈËÌáµ½ Web 1.0£¬Êµ¼ÊÉÏËüÖ¸µÄ¾ÍÊǾßÓÐÍêÈ«²»Í¬µÄÇëÇóºÍÏìӦģÐ͵Ĵ«Í³ Web¡£±ÈÈ磬µ½ Amazon.com ÍøÕ¾Éϵã»÷Ò»¸ö°´Å¥»òÕßÊäÈë ......

Ajax½éÉÜ XMLHttpRequest

Ajax½éÉÜ
AJAX - ä¯ÀÀÆ÷Ö§³Ö
AJAX µÄÒªµãÊÇ XMLHttpRequest ¶ÔÏó¡£²»Í¬µÄä¯ÀÀÆ÷´´½¨ XMLHttpRequest ¶ÔÏóµÄ·½·¨ÊÇÓвîÒìµÄ¡£IE ä¯ÀÀÆ÷ʹÓà ActiveXObject£¬¶øÆäËûµÄä¯ÀÀÆ÷ʹÓÃÃûΪ XMLHttpRequest µÄ JavaScript ÄÚ½¨¶ÔÏó¡£ÈçÐèÕë¶Ô²»Í¬µÄä¯ÀÀÆ÷À´´´½¨´Ë¶ÔÏó£¬ÎÒÃÇҪʹÓÃÒ»Ìõ "try and catch" Óï¾ä¡£
<script type="t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ