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

jQuery Ajax È«½âÎö


±¾ÎĵØÖ·: jQuery Ajax È«½âÎö
±¾ÎÄ×÷ÕߣºQLeelulu
תÔØÇë±êÃ÷³ö´¦£¡
jQueryȷʵÊÇÒ»¸öͦºÃµÄÇáÁ¿¼¶µÄJS¿ò¼Ü£¬ÄÜ°ïÖúÎÒÃÇ¿ìËٵĿª·¢JSÓ¦Ó㬲¢ÔÚÒ»¶¨³Ì¶ÈÉϸıäÁËÎÒÃÇдJavaScript´úÂëµÄÏ°¹ß¡£
·Ï»°ÉÙ˵£¬Ö±½Ó½øÈëÕýÌ⣬ÎÒÃÇÏÈÀ´¿´Ò»Ð©¼òµ¥µÄ·½·¨£¬ÕâЩ·½·¨¶¼ÊǶÔjQuery.ajax()½øÐзâ×°ÒÔ·½±ãÎÒÃÇʹÓõķ½·¨£¬µ±È»£¬Èç¹ûÒª´¦Àí¸´ÔÓµÄÂß¼­£¬»¹ÊÇÐèÒªÓõ½jQuery.ajax()µÄ(Õâ¸öºóÃæ»á˵µ½).
1. load( url, [data], [callback] ) £ºÔØÈëÔ¶³Ì HTML Îļþ´úÂë²¢²åÈëÖÁ DOM ÖС£
url (String) : ÇëÇóµÄHTMLÒ³µÄURLµØÖ·¡£
data (Map) : (¿ÉÑ¡²ÎÊý) ·¢ËÍÖÁ·þÎñÆ÷µÄ key/value Êý¾Ý¡£
callback (Callback) : (¿ÉÑ¡²ÎÊý) ÇëÇóÍê³Éʱ(²»ÐèÒªÊÇsuccessµÄ)µÄ»Øµ÷º¯Êý¡£
Õâ ¸ö·½·¨Ä¬ÈÏʹÓà GET ·½Ê½À´´«µÝµÄ£¬Èç¹û[data]²ÎÊýÓд«µÝÊý¾Ý½øÈ¥£¬¾Í»á×Ô¶¯×ª»»ÎªPOST·½Ê½µÄ¡£jQuery 1.2 ÖУ¬¿ÉÒÔÖ¸¶¨Ñ¡Ôñ·û£¬À´É¸Ñ¡ÔØÈëµÄ HTML Îĵµ£¬DOM Öн«½ö²åÈëɸѡ³öµÄ HTML ´úÂë¡£Óï·¨ÐÎÈç "url #some > selector"¡£
Õâ¸ö·½·¨¿ÉÒԺܷ½±ãµÄ¶¯Ì¬¼ÓÔØһЩHTMLÎļþ£¬ÀýÈç±íµ¥¡£
ʾÀý´úÂ룺
$(".ajax.load").load("http://www.cnblogs.com/QLeelulu/archive/2008/03/30/1130270.html .post",
function (responseText, textStatus, XMLHttpRequest){
this;//ÔÚÕâÀïthisÖ¸ÏòµÄÊǵ±Ç°µÄDOM¶ÔÏ󣬼´$(".ajax.load")[0]
//alert(responseText);//ÇëÇ󷵻صÄÄÚÈÝ
//alert(textStatus);//ÇëÇó״̬£ºsuccess£¬error
//alert(XMLHttpRequest);//XMLHttpRequest¶ÔÏó
});
ÕâÀォÏÔʾ½á¹û¡£
×¢£º²»ÖªµÀΪʲôURLд¾ø¶Ô·¾¶ÔÚFFÏ»á³ö´í£¬ÖªµÀµÄÂé·³¸æËßÏ¡£ÏÂÃæµÄget()ºÍpost()ʾÀýʹÓõÄÊǾø¶Ô·¾¶£¬ËùÒÔÔÚFFÏÂÄ㽫»á³ö´í²¢²»»á¿´µ½·µ»Ø½á¹û¡£»¹ÓÐget()ºÍpost()ʾÀý¶¼ÊÇ¿çÓòµ÷Óõģ¬·¢ÏÖ´«ÉÏÀ´ºóû°ì·¨»ñÈ¡½á¹û£¬ËùÒÔ°ÑÔËÐа´Å¥È¥µôÁË¡£
2. jQuery.get( url, [data], [callback] )£ºÊ¹ÓÃGET·½Ê½À´½øÐÐÒì²½ÇëÇó
²ÎÊý£º
url (String) : ·¢ËÍÇëÇóµÄURLµØÖ·.
data (Map) : (¿ÉÑ¡) Òª·¢Ë͸ø·þÎñÆ÷µÄÊý¾Ý£¬ÒÔ Key/value µÄ¼üÖµ¶ÔÐÎʽ±íʾ£¬»á×öΪQueryString¸½¼Óµ½ÇëÇóURLÖС£
callback (Function) : (¿ÉÑ¡) ÔØÈë³É¹¦Ê±»Øµ÷º¯Êý(Ö»Óе±ResponseµÄ·µ»Ø״̬ÊÇsuccess²ÅÊǵ÷Óø÷½·¨)¡£
ÕâÊÇÒ»¸ö¼òµ¥µÄ GET ÇëÇó¹¦ÄÜÒÔÈ¡´ú¸´ÔÓ $.ajax ¡£ÇëÇó³É¹¦Ê±¿Éµ÷Óûص÷º¯Êý¡£Èç¹ûÐèÒªÔÚ³ö´íʱִÐк¯Êý£¬ÇëʹÓà $.ajax¡£Ê¾Àý´úÂ룺
$.get("./Ajax.aspx", {Action:"get",Name:


Ïà¹ØÎĵµ£º

AJAXʵ¼ùDWRƪ

DWR(Direct Web Remoting)ÊÇÒ»¸öWEBÔ¶³Ìµ÷Óÿò¼Ü.ÀûÓÃÕâ¸ö¿ò¼Ü¿ÉÒÔÈÃAJAX¿ª·¢±äµÃºÜ¼òµ¥.ÀûÓÃDWR¿ÉÒÔÔÚ¿Í»§¶ËÀûÓÃJavaScriptÖ±½Óµ÷Ó÷þÎñ¶ËµÄJava·½·¨²¢·µ»ØÖµ¸øJavaScript¾ÍºÃÏñÖ±½Ó±¾µØ¿Í»§¶Ëµ÷ÓÃÒ»Ñù(DWR¸ù¾ÝJavaÀàÀ´¶¯Ì¬Éú³ÉJavaScrip´úÂë).ËüµÄ×îа汾DWR0.6Ìí¼ÓÐí¶àÌØÐÔÈç:Ö§³ÖDom TreesµÄ×Ô¶¯ÅäÖÃ,Ö§³ÖSpring(JavaS ......

AJAX¼¼Êõ»ã×Ü

AJAX
AJAXÈ«³ÆΪ“Asynchronous JavaScript and XML”£¨Òì²½JavaScriptºÍXML£©£¬ÊÇÖ¸Ò»ÖÖ´´½¨½»»¥Ê½ÍøÒ³Ó¦ÓõÄÍøÒ³¿ª·¢¼¼Êõ¡£ËüÓлúµØ°üº¬ÁËÒÔϼ¸ÖÖ¼¼Êõ£º
Ajax£¨Asynchronous JavaScript + XML£©µÄ¶¨Òå
»ùÓÚweb±ê×¼£¨standards-based presentation£©XHTML+CSSµÄ±íʾ£»
ʹÓà DOM£¨Document Object Model£© ......

JSONÀý×Ó£¨struts ajax json£©

À´Ô´£ºhaoxuewu - BlogJava
¡¡¡¡Ç°¶Îʱ¼ä×öÏîÄ¿Óõ½ÁËjson£¬½ñÌìÎÒ³éʱ¼äдÁËÒ»¸östruts+ajax+jsonµÄÀý×Ó.
¡¡¡¡¸öÈ˸оõajax+jsonÔںܴó³Ì¶ÈÉϽµµÍÁËÍøÂçºÍ·þÎñÆ÷µÄIO£¬ÊÇÒ»¸öºÜ²»´íµÄ×éºÏ£¡
¡¡¡¡1£ºjsonµÄlibÎÒÓõÄÊÇjson-lib-2.1-jdk15.jar£¬Ëü¿ÉÒÔÔÚ
¡¡¡¡2£ºstrutsÓõÄÊÇ1.2
¡¡¡¡3£ºÓõ½ÁËjsµÚÈý·½prototype.js£¬Ö÷ ......

AJAXµ÷Óà ASP.net ±¾µØÎļþϵͳµÄ¹ÖÎÊÌâ

×î½ü¿ª·¢ExtÓ¦Óã¬Ê¹ÓÃajaxÇëÇóÊý¾Ýʱ£¬Óöµ½ÁËÇëÇóÊý¾ÝÒÔ·µ»Ø£¬µ«IEÀïÈ´ÎÞ·¨ÏÔʾµÄ¹ÖÎÊÌâ¡£
ʹÓÃHTTPWatch²é¿´£¬·¢ÏÖERROR_INTERNET_CONNECTION_RESET¡£
ʹÓÃFireFoxºÍgoogleä¯ÀÀÆ÷¶¼Ã»ÓÐÎÊÌ⣬ÍøÉϲéÕÒ˵ÍøÕ¾·ÅÔÚIISÉÏûÓÐÎÊÌ⣬ÊÔÑéºóÖ¤Ã÷ÓÐЧ¡£
µ«Í¬Ê¿ª·¢Óûú´ó²¿·Ö¶¼ÊÇXPϵͳ£¬Óв¿·Ö»¹ÊÇHOME°æ£¬Òò´Ë¸ÃÎÊÌâ±ØÐëÕÒµ ......

FABridge½Ì³Ì(Flex+Ajax)

Ò».ͨ¹ýjs·ÃÎÊFlex×é¼þ
    1.×¼±¸¹¤×÷¡£ÏȽ¨Á¢Flex¹¤³Ì :fademo£¬²¢·ÅÖÃÒ»¸öÎı¾¿ò:txtName¡£×öÍêºó´úÂëÓ¦¸ÃÀàËÆÓÚÕâ¸öÑù×Ó£º
view plaincopy to clipboardprint?
·········10······· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ