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

uchome2.0µÄajax¼¼ÊõÁ÷³ÌÑо¿Ðĵøú´ó¼Ò·ÖÏí

Ç°ÑÔ£º
»ùÓÚuchomerµÄ²å¼þÈç¹ûûÓÐʹÓÃajax»òflex£¬¿ÉÒÔ˵ÎÞÂÛÈçºÎÒ²×ö²»µ½ÍêÃÀµÄ¡£¶øÏà±ÈÓÚflex£¬ajaxʹÓõĽ϶ࡣºÃ¶à²å¼þ¿ª·¢ÕßÔÚÑо¿
uchomeµÄajaxµÄʹÓùý³ÌÖл¨·ÑÁ˲»ÉÙʱ¼ä£¬´ËÎÄÒâÔÚ¼õÉÙ²å¼þ¿ª·¢ÕßµÄÑо¿Ê±¼ä¡£flexÏà¹Ø²å¼þµÄ˵Ã÷£¬¾´Çë¹Ø×¢£¡
´ËÎÄÕûÀí»¨Á˱¾Í¬Ñ§4¸öСʱÒÔÉϵÄʱ¼ä£¬Èç¹û°æÖ÷¾õµÃ¶Ô´ó¼ÒÓаïÖú£¬Çë¼Ó¾«£¡·Ç³£¸Ðл£º£©
ÎÒÃǾÙÈÕÖ¾»Ø¸´ÎªÀý£º
Ò»¡¢¾Ö²¿Ë¢ÐµIJ¿·Ö£¨ÏÈ¿´¿´ÏÖÏó£©
ͼһ£º
1¡¢ÆÀÂÛÌõÊýÓÉÔ­À´µÄaÐÞ¸ÄΪa+1;
2¡¢ÆÀÂÛÄÚÈÝ¡£´ÓÊý¾Ý¿âÀï¶ÁÈ¡ÏÔʾÓÚ´Ë£»
3¡¢ÌáʾÓÕâÀïµÄ“¸ãºÃÁË”£¬ÊÇÎÒÐÞ¸ÄÖ®ºóµÄ£¬Ô­À´ºÃÏñÊÇ“ÄãÖ´ÐеIJÙ×÷Òѳɹ¦”¡£µ±È»ÀïµÄÄÚÈÝÒ²¿ÉÄÜÊÇ“Äã·¢ÌûµÄʱ¼äÌ«¶ÌÁË£¬ÇëµÈµÈ59ÃëºóÔÙ·¢”Ö®ÀàµÄ¡£
×¢Ò⣬ÓÃinnerHTMLÀ´Õ¹Ê¾µÄ»¹ÓÐÓÒÉϽǵĺìÉ«loading…£¬²»¹ýÒòΪ³öÏÖµÄʱ¼äÌ«¶Ì£¬²»·½±ã½Øͼ£¬¶øÇÒ´ó¼ÒÒ²ºÜÈÝÒ×Àí½â£¬Ôڴ˲»¶à½âÊÍ¡£
¶þ¡¢ºÃÁË£¬¿´ÍêÏÖÏóÖ®ºó£¬ÎÒÃÇÒª´Ó´úÂëÀ´Ñо¿Ö´Ðйý³ÌÁË
1¡¢Ä£°åÎļþtemplate/default/space_blog_view.htmÆÀÂÛ±íµ¥´úÂëÀïµÄ
£¨1£©¡¢onclick=”ajaxpost(’quickcommentform_{$id}’, ‘comment_add’)” />
¸´ÖÆ´úÂë
µã»÷“ÆÀÂÛ”µÄʱºòÒªµ÷ÓõÄjava scriptº¯Êýajaxpost(),ajaxpostº¯ÊýÔÚÄÄÀïÄØ£¿ÔÚ
2¡¢source/script_ajax.jsµÄ267ÐÐ
function ajaxpost(formid, func, timeout) {
showloading();
if(ajaxpostHandle != 0) {
return false;
}
var ajaxframeid = ‘ajaxframe’;
var ajaxframe = $(ajaxframeid);
if(ajaxframe == null) {
if (is_ie && !is_opera) {
ajaxframe = document.createElement(”<iframe name=’” + ajaxframeid + “‘ id=’” + ajaxframeid + “‘></iframe>”);
} else {
ajaxframe = document.createElement(”iframe”);
ajaxframe.name = ajaxframeid;
ajaxframe.id = ajaxframeid;
}
ajaxframe.style.display = ‘none’;
$(’append_parent’).appendChild(ajaxframe);
}
//²úÉúÒì²½µÄÊ®×Ö·¿Ú
$(formid).target = ajaxframeid;
$(formid).action = $(formid).action + ‘&inajax=1′;
ajaxpostHandle = [formid, func, timeout];
if(ajaxframe.attachEve


Ïà¹ØÎĵµ£º

JSONʵÏÖAJAXÎÞˢмÓÔØ

AJAXÖ÷ÒªÓÐÈýÖÖ£º×î¼òµ¥µÄÖ±½Ó¼ÓÔØÕû¸öÍøÒ³£¬È»ºóͨ¹ýinnerHTMLÖ®ÀàµÄ°ì·¨ÏÔʾÔÚÍøÒ³ÉÏ£¬Õâ¸öÏÖÔÚÓÃPrototype.jsµÄAjax.UpdaterÀàÄÜÇá¶øÒ×¾ÙµØʵÏÖ£»ÁíÒ»ÖÖ×î³£ÓõÄÊǼÓÔØÒ»¸öÖ»°üº¬Êý¾ÝµÄÎļþ£¨±ÈÈçXML£©È»ºóͨ¹ýһϵÁдúÂë´¦ÀíºóÏÔʾ¸øÓû§£»»¹ÓÐÒ»ÖÖÊÇÏñDWR»òPHPRPCÄÇÑùÖ±½Ó°Ñ·þÎñÆ÷¶ËµÄº¯ÊýÉú³É¶ÔÓ¦µÄJS´úÂë¸ø¿Í»§¶Ë£¬¿ ......

AJAX.MVC¿ò¼ÜÉè¼Æ³ÂÊö 1£©AJAX½»»¥Éè¼Æ

Ç°ºó¶ËµÄ½»»¥ÊÇÕû¸ö¿ò¼ÜµÄÖÐÐÄ£¬ÎÒÏ£Íû´ÓÁ÷µÄ½Ç¶ÈÀ´Éè¼ÆAJAXµÄ½»»¥
AJAXµÄÉè¼Æ½«ºá¹áÇ°ºó¶Ë
Ç°¶ËÊÇÖ÷¶¯
ºó¶ËÊDZ»¶¯
ÕûÌ忼ÂǵĻ° Ç°ºó¶ËʹÓÃÒ»¸öͳһµÄ½Ó¿Ú½øÐÐAJAX½»»¥
ºó¶Ë ÓÃÒ»¸öΨһµÄURLÀ´´¦Àí AJAXÇëÇó
½Ó¿ÚÃû³Æ     ´¦Àí½Ó¿Ú£º[http://ÓòÃû/mvc.ajax]  ·â×°ËùÓеÄAJAXÇëÇóµÄÔ¤´¦Àí
......

ÀàËÆAjaxµ¯³ö´°¿ÚµÄDIV²ãЧ¹û´úÂë

´´½¨Ò»¸öµ¯³öDIV´°¿Ú¿ÉÄÜÊÇÏÖÔÚÍøÕ¾/ÍøÒ³ÖÆ×÷ÖÐ×î³£Åöµ½µÄÎÊÌâÖ®Ò»¡£´«Í³µÄJavaScriptµ¯´°ÒѾ­²»ÊʺÏÄ¿Ç°ÍøÕ¾µÄÉè¼ÆÀíÄîÁË£¬ÀíÓÉÓжþ£ºÊ× ÏÈ£¬²»ÓѺ×—ÉúÓ²µÄµ¯³ö¶Ô»°¿òÇÒ°éËæ×Å“ßÑ”µÄÒ»Éù¶ÔÓû§ÌåÑéÊǸöºÜ´óµÄÌôÕ½£»Æä´Î£¬¼æÈÝÐÔ²»¹»Ç¿——ÓÐÏ൱¶àµÄä¯ÀÀÆ÷ÆÁ±ÎÁËÕâÖÖJSµÄAlert() ·½·¨¡ ......

WCFÖеķþÎñºÍASP.NET AJAXÖеÄWebService

WCFµÄ¼Ü¹¹£ºusing System.ServiceModel;
ÆõÔ¼:Contract
[ServiceContract]
public partial interface IContract
{
        [OperationContract]
        string DocumentWebHostUrl();
}
·þÎñ£ºService
[ServiceBehavior(IncludeException ......

AJAXÒ²Óа²È«Òþ»¼ ̸̸AJAXµÄ°²È«ÐÔ

Web¿ª·¢Õß²»»á×¢Òâµ½ÓÉ “AJAX(Asynchronous JavaScript And
XML)”Ëù´øÀ´µÄ¼¤Çé¡£²»·ÑÁ¦Æø¾ÍÄÜ´´½¨ÏñGoogle
SuggestÄÇÑùµÄÖÇÄÜÍøÕ¾»òÕßÏñGmailÄÇÑù»ùÓÚWebµÄÓ¦ÓóÌÐò£¬ÕâÔںܴó³Ì¶ÈÉÏÒª¹é¹¦ÓÚÕâÖÖ¼¼Êõ¡£È»¶ø£¬°éËæ×ÅAJAXÓ¦ÓóÌÐòµÄ·¢Õ¹£¬ÎÒÃÇ·¢
ÏÖÁËËüµÄһЩ²»×ãÖ®´¦£¬ÎÒÃÇ·¢ÏÖËüµÄ°²È«Â©¶´Ò²ÔÚÖð½¥±ä´ó£¬¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ