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
Ïà¹ØÎĵµ£º
jQuery µ×²ã AJAX ʵÏÖ¡£¼òµ¥Ò×Óõĸ߲ãʵÏÖ¼û $.get, $.post µÈ¡£$.ajax() ·µ»ØÆä´´½¨µÄ XMLHttpRequest ¶ÔÏó¡£´ó¶àÊýÇé¿öÏÂÄãÎÞÐèÖ±½Ó²Ù×÷¸Ã¶ÔÏ󣬵«ÌØÊâÇé¿öÏ¿ÉÓÃÓÚÊÖ¶¯ÖÕÖ¹ÇëÇó¡£
×¢Ò⣺ Èç¹ûÄãÖ¸¶¨ÁË dataType Ñ¡ÏÇëÈ·±£·þÎñÆ÷·µ»ØÕýÈ·µÄ MIME ÐÅÏ¢£¬(Èç xml ·µ»Ø "text/xml")¡£´íÎóµÄ MIME ÀàÐÍ¿ÉÄܵ¼Ö²»¿ÉÔ¤Ö ......
×î½ü×ö¸öÈËÍøÕ¾Óöµ½AJAX¿ç×ÓÓòÃûµÄÎÊÌâ¡£
ż¶û¿´µ½baiduµÄͨÐÐÖ¤´¦Àí¶¼ÊÇÔÚ¶þ¼¶ÓòÃûpassport.baidu.comÖд¦ÀíµÄ£¬
µ«ÊÇbaiduºÜ¶àµØ·½µÇ¼¶¼ºÃÏñÊÇÓÃajax´¦ÀíµÄ£¬ËûÊÇÔõô×öµÄÄØ£¿Ñо¿ÁËһϣ¬·¢ÏÖÒ»¸öС¼¼ÇÉ¡£
²»·ÀÈôó¼ÒÒ²½è¼øÒ»Ï¡£
ÔÚhttp://zhidao.baidu.com/ δµÇ¼Óû§»Ø´ðÎÊÌâʱ»áÓÃiframeµ÷ÓÃhttp://zhidao.bai ......
WCFµÄ¼Ü¹¹£ºusing System.ServiceModel;
ÆõÔ¼:Contract
[ServiceContract]
public partial interface IContract
{
[OperationContract]
string DocumentWebHostUrl();
}
·þÎñ£ºService
[ServiceBehavior(IncludeException ......
http://ajaxcontroltoolkit.codeplex.com/releases/view/33804
1>°²×°Ajax ASPAJAXExtSetup.msi £¨ÔÚhttp://ajax.asp.netÏÂÔØ£©
2>°²×°AjaxÄ£°å ASPAJAXSamples.msi
3>ÏÂÔØ ×îа汾 ajaxcontroltoolkit
http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=AtlasControlToolkit
......