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
Ïà¹ØÎĵµ£º
AJAXÖ÷ÒªÓÐÈýÖÖ£º×î¼òµ¥µÄÖ±½Ó¼ÓÔØÕû¸öÍøÒ³£¬È»ºóͨ¹ýinnerHTMLÖ®ÀàµÄ°ì·¨ÏÔʾÔÚÍøÒ³ÉÏ£¬Õâ¸öÏÖÔÚÓÃPrototype.jsµÄAjax.UpdaterÀàÄÜÇá¶øÒ×¾ÙµØʵÏÖ£»ÁíÒ»ÖÖ×î³£ÓõÄÊǼÓÔØÒ»¸öÖ»°üº¬Êý¾ÝµÄÎļþ£¨±ÈÈçXML£©È»ºóͨ¹ýһϵÁдúÂë´¦ÀíºóÏÔʾ¸øÓû§£»»¹ÓÐÒ»ÖÖÊÇÏñDWR»òPHPRPCÄÇÑùÖ±½Ó°Ñ·þÎñÆ÷¶ËµÄº¯ÊýÉú³É¶ÔÓ¦µÄJS´úÂë¸ø¿Í»§¶Ë£¬¿ ......
Ç°ºó¶ËµÄ½»»¥ÊÇÕû¸ö¿ò¼ÜµÄÖÐÐÄ£¬ÎÒÏ£Íû´ÓÁ÷µÄ½Ç¶ÈÀ´Éè¼ÆAJAXµÄ½»»¥
AJAXµÄÉè¼Æ½«ºá¹áÇ°ºó¶Ë
Ç°¶ËÊÇÖ÷¶¯
ºó¶ËÊDZ»¶¯
ÕûÌ忼ÂǵĻ° Ç°ºó¶ËʹÓÃÒ»¸öͳһµÄ½Ó¿Ú½øÐÐAJAX½»»¥
ºó¶Ë ÓÃÒ»¸öΨһµÄURLÀ´´¦Àí AJAXÇëÇó
½Ó¿ÚÃû³Æ ´¦Àí½Ó¿Ú£º[http://ÓòÃû/mvc.ajax] ·â×°ËùÓеÄAJAXÇëÇóµÄÔ¤´¦Àí
......
´´½¨Ò»¸öµ¯³öDIV´°¿Ú¿ÉÄÜÊÇÏÖÔÚÍøÕ¾/ÍøÒ³ÖÆ×÷ÖÐ×î³£Åöµ½µÄÎÊÌâÖ®Ò»¡£´«Í³µÄJavaScriptµ¯´°ÒѾ²»ÊʺÏÄ¿Ç°ÍøÕ¾µÄÉè¼ÆÀíÄîÁË£¬ÀíÓÉÓжþ£ºÊ× ÏÈ£¬²»ÓѺ×—ÉúÓ²µÄµ¯³ö¶Ô»°¿òÇÒ°éËæ×Å“ßÑ”µÄÒ»Éù¶ÔÓû§ÌåÑéÊǸöºÜ´óµÄÌôÕ½£»Æä´Î£¬¼æÈÝÐÔ²»¹»Ç¿——ÓÐÏ൱¶àµÄä¯ÀÀÆ÷ÆÁ±ÎÁËÕâÖÖJSµÄAlert() ·½·¨¡ ......
WCFµÄ¼Ü¹¹£ºusing System.ServiceModel;
ÆõÔ¼:Contract
[ServiceContract]
public partial interface IContract
{
[OperationContract]
string DocumentWebHostUrl();
}
·þÎñ£ºService
[ServiceBehavior(IncludeException ......
Web¿ª·¢Õß²»»á×¢Òâµ½ÓÉ “AJAX(Asynchronous JavaScript And
XML)”Ëù´øÀ´µÄ¼¤Çé¡£²»·ÑÁ¦Æø¾ÍÄÜ´´½¨ÏñGoogle
SuggestÄÇÑùµÄÖÇÄÜÍøÕ¾»òÕßÏñGmailÄÇÑù»ùÓÚWebµÄÓ¦ÓóÌÐò£¬ÕâÔںܴó³Ì¶ÈÉÏÒª¹é¹¦ÓÚÕâÖÖ¼¼Êõ¡£È»¶ø£¬°éËæ×ÅAJAXÓ¦ÓóÌÐòµÄ·¢Õ¹£¬ÎÒÃÇ·¢
ÏÖÁËËüµÄһЩ²»×ãÖ®´¦£¬ÎÒÃÇ·¢ÏÖËüµÄ°²È«Â©¶´Ò²ÔÚÖð½¥±ä´ó£¬¾ ......