AJAX Follow Me
×î½üÍøÉÏÌáµÄºÜ¶àµÄÒ»¸öиÅÄî¾ÍÊÇ AJAX ÁË, ÄÇô, AJAX ÊÇʲôÄØ? ÒÔÏÂÄÚÈÝÒýÓÃÍøÉÏ×ÊÁÏ:
AJAXÈ«³ÆΪ“Asynchronous JavaScript and XML”£¨Òì²½JavaScriptºÍXML£©£¬ÊÇÖ¸Ò»ÖÖ´´½¨½»»¥Ê½ÍøÒ³Ó¦ÓõÄÍøÒ³¿ª·¢¼¼Êõ¡£ËüÓлúµØ°üº¬ÁËÒÔϼ¸ÖÖ¼¼Êõ£º
Ajax£¨Asynchronous JavaScript + XML£©µÄ¶¨Òå
»ùÓÚ web±ê×¼£¨standards-based presentation£©XHTML+CSSµÄ±íʾ£»
ʹÓà DOM£¨Document Object Model£©½øÐж¯Ì¬ÏÔʾ¼°½»»¥£»
ʹÓà XML ºÍ XSLT ½øÐÐÊý¾Ý½»»»¼°Ïà¹Ø²Ù×÷£»
ʹÓà XMLHttpRequest ½øÐÐÒì²½Êý¾Ý²éѯ¡¢¼ìË÷£»
ʹÓà JavaScript ½«ËùÓеĶ«Î÷°ó¶¨ÔÚÒ»Æð¡£Ó¢ÎIJμûAjaxµÄÌá³öÕßJesse James GarrettµÄÔÎÄ
ÀàËÆÓÚDHTML»òLAMP£¬AJAX²»ÊÇÖ¸Ò»ÖÖµ¥Ò»µÄ¼¼Êõ£¬¶øÊÇÓлúµØÀûÓÃÁËһϵÁÐÏà¹ØµÄ¼¼Êõ¡£ÊÂʵÉÏ£¬Ò»Ð©»ùÓÚAJAXµÄ“ÅÉÉú/ºÏ³É”ʽ£¨derivative/composite£©µÄ¼¼ÊõÕýÔÚ³öÏÖ£¬Èç“AFLAX”¡£
AJAXµÄÓ¦ÓÃʹÓÃÖ§³ÖÒÔÉϼ¼ÊõµÄwebä¯ÀÀÆ÷×÷ΪÔËÐÐƽ̨¡£ÕâЩä¯ÀÀÆ÷Ä¿Ç°°üÀ¨£ºMozilla¡¢Firefox¡¢Internet Explorer¡¢Opera¡¢Konqueror¼°Safari¡£µ«ÊÇOpera²»Ö§³ÖXSL¸ñʽ¶ÔÏó£¬Ò²²»Ö§³ÖXSLT¡£
Ó봫ͳµÄwebÓ¦ÓñȽÏ
´«Í³µÄwebÓ¦ÓÃÔÊÐíÓû§Ìîд±íµ¥(form)£¬µ±Ìá½»±íµ¥Ê±¾ÍÏòweb·þÎñÆ÷·¢ËÍÒ»¸öÇëÇó¡£·þÎñÆ÷½ÓÊÕ²¢´¦Àí´«À´µÄ±íµ¥£¬È»ºó·µ»ØÒ»¸öеÄÍøÒ³¡£Õâ¸ö×ö·¨ÀË·ÑÁËÐí¶à´ø¿í£¬ÒòΪÔÚÇ°ºóÁ½¸öÒ³ÃæÖеĴ󲿷ÖHTML´úÂëÍùÍùÊÇÏàͬµÄ¡£ÓÉÓÚÿ´ÎÓ¦ÓõĽ»»¥¶¼ÐèÒªÏò·þÎñÆ÷·¢ËÍÇëÇó£¬Ó¦ÓõÄÏìӦʱ¼ä¾ÍÒÀÀµÓÚ·þÎñÆ÷µÄÏìӦʱ¼ä¡£Õâµ¼ÖÂÁËÓû§½çÃæµÄÏìÓ¦±È±¾µØÓ¦ÓÃÂýµÃ¶à¡£
Óë´Ë²»Í¬£¬AJAXÓ¦ÓÿÉÒÔ½öÏò·þÎñÆ÷·¢ËͲ¢È¡»Ø±ØÐèµÄÊý¾Ý£¬ËüʹÓÃSOAP»òÆäËüһЩ»ùÓÚXMLµÄweb service½Ó¿Ú£¬²¢ÔÚ¿Í»§¶Ë²ÉÓÃJavaScript´¦ÀíÀ´×Ô·þÎñÆ÷µÄÏìÓ¦¡£ÒòΪÔÚ·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä½»»»µÄÊý¾Ý´óÁ¿¼õÉÙ£¬½á¹ûÎÒÃǾÍÄÜ¿´µ½ÏìÓ¦¸ü¿ìµÄÓ¦Óá£Í¬Ê±ºÜ¶àµÄ´¦Àí¹¤×÷¿ÉÒÔÔÚ·¢³öÇëÇóµÄ¿Í»§¶Ë»úÆ÷ÉÏÍê³É£¬ËùÒÔWeb·þÎñÆ÷µÄ´¦Àíʱ¼äÒ²¼õÉÙÁË¡£
¹ØÓÚ AJAX Ìá³öÕßÎĵµµÄ·Òë¼ûÕâÀï: Ajax: A New Approach to Web Applications(ÖÐÓ¢¶ÔÕÕ) . Äú¿ÉÄÜÏë¿´¿´µ½µ×ÓÐʲôºÜ¿áºÜìÅµÄ Web Õ¾µãÓõ½ÁË AJAX, ¿ÉÒÔ¿´ÕâÀï: Google Suggest, Google Maps, »¹ÓÐÎÒ¸öÈË×öµÄÒ»¸öССµÄÀý×Ó: AJAX Test.
AJAX ÊÇÒ»¸öгöÏÖµÄÃû´Ê, µ«ÊÇÒýÓõÄÕ⼸Ïî¼¼Êõ¶¼ÊÇÀϵĴæÔÚÁ˺ܾõļ¼Êõ, ÉõÖÁ, ×î´óΪÍƳçµÄ XMLHttpRequest Ò²²»ÊÇ W3C ¹æ·¶µÄÒ
Ïà¹ØÎĵµ£º
jQuery Ajax È«½âÎö
±¾ÎĶÌÖ·£ºhttp://s8.hk/0itq
<!--
.ajax div{
border: solid 1px red;
}
-->
// <![CDATA[
$(function(){
$("#btnajax").click(function(){
$.ajax({
type: "get",
url: "/rss",
beforeSend: function(XMLHttpRequ ......
ajax.dllÒѾÊǺÜÀϵĶ«Î÷ÁË£¬µ«ÊǽñÌìÎÒ²ÅÓõ½Ëü£¬ÏÖÔÚ°ÑËüµÄʹÓ÷½·¨¼Ç¼ÏÂÀ´¡£
1.ÔÚweb.configÖÐÅäÖÃajaxµÄ´¦Àí³ÌÐò¡£
<httpHandlers>
<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
<httpHandlers>
2. ×¢²á´¦Àí³ÌÐòÀ࣬ajaxTestÊ ......
Á˽âJavaScriptµÄÈ˶¼ÖªµÀJavaScriptµÄthis²»×ÜÊÇÖ¸Ïòµ±Ç°¶ÔÏ󣬺¯Êý»òÀàÖеÄthisÖ¸ÏòÓëµ÷ÓÃÕâ¸öº¯ÊýµÄ¶ÔÏóÒÔ¼°ÉÏÏÂÎÄ»·¾³ÊÇϢϢÏà¹ØµÄ¡£ÈçÔÚÈ«¾Ö×÷ÓÃÓòµ÷ÓÃÒ»¸öº¬thisµÄ¶ÔÏ󣬴Ëʱµ±Ç°¶ÔÏóµÄthisÖ¸ÏòµÄÊÇwindow¡£ÎªÁËÈÃthisµÄÖ¸Ïò·ûºÏ×Ô¼ºµÄÒâÔ¸£¬JavaScriptÌṩÁËÁ½¸ö·½·¨ÓÃÒԸıäthisµÄÖ¸Ïò£¬ËüÃÇÊÇcallºÍapply£¬µ±È»Ò²Ó ......
±¾ÎĵØÖ·: jQuery Ajax È«½âÎö
±¾ÎÄ×÷ÕߣºQLeelulu
תÔØÇë±êÃ÷³ö´¦£¡
jQueryȷʵÊÇÒ»¸öͦºÃµÄÇáÁ¿¼¶µÄJS¿ò¼Ü£¬ÄÜ°ïÖúÎÒÃÇ¿ìËٵĿª·¢JSÓ¦Ó㬲¢ÔÚÒ»¶¨³Ì¶ÈÉϸıäÁËÎÒÃÇдJavaScript´úÂëµÄÏ°¹ß¡£
·Ï»°ÉÙ˵£¬Ö±½Ó½øÈëÕýÌ⣬ÎÒÃÇÏÈÀ´¿´Ò»Ð©¼òµ¥µÄ·½·¨£¬ÕâЩ·½·¨¶¼ÊǶÔjQuery.ajax()½øÐзâ×°ÒÔ·½±ãÎÒÃÇʹÓõķ½·¨£¬µ±È»£¬È ......