Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¶¯Ì¬¼ÓÔØĿ¼Ê÷£¨jquery treeview£©

ÐèÇó£º
   ¶¯Ì¬¼ÓÔØĿ¼Ê÷½ÚµãÊý¾Ý¡£¼´£ºÊ÷µÄ³õʼ״̬Ϊ¸ù½ÚµãÊ÷£¬µ±µã»÷ÆäÖÐÒ»¸ö½Úµãʱ£¬ÔÙ´ÓÊý¾Ý¿âÖлñÈ¡µ±Ç°½ÚµãµÄ×ӽڵ㡣
»·¾³£º
   Struts1+Hibernate3.0+jQuery+treeview
½â¾ö·½°¸£º
1.ÎÒ×Ô¼ºµÄÏîÄ¿ÐèÇóÊÇ£º»ñÈ¡linuxµÄFTPĿ¼£¬ÒÔ¶¯Ì¬¼ÓÔصķ½Ê½È¡µÃ¸ÃFTPÉϵÄËùÓÐĿ¼¼°ÎļþÉú³ÉjsÊ÷£¬µã» ......

AjaxÐÅÏ¢·´À¡ÏÔʾ

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0044)http://www.qqip.cn -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>new document</TITLE>
<META ht ......

ajax.dll .netÖмòµ¥Ê¹ÓÃajax

ajax.dllÒѾ­ÊǺÜÀϵĶ«Î÷ÁË£¬µ«ÊǽñÌìÎÒ²ÅÓõ½Ëü£¬ÏÖÔÚ°ÑËüµÄʹÓ÷½·¨¼Ç¼ÏÂÀ´¡£
1.ÔÚweb.configÖÐÅäÖÃajaxµÄ´¦Àí³ÌÐò¡£
<httpHandlers>
     <add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
<httpHandlers>
2. ×¢²á´¦Àí³ÌÐòÀ࣬ajaxTestÊ ......

FABridge½Ì³Ì(Flex+Ajax)

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