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

jquery ajax returnÖµ²»ÄÜÈ¡µÃµÄ½â¾ö·½°¸

´ó¼ÒÏÈ¿´Ò»¶Î¼òµ¥µÄjquery ajax ·µ»ØÖµµÄjs
´úÂë
function getReturnAjax{
  $.ajax({
    type:"POST",
    url:"ajax/userexist.aspx",
    data:"username="+vusername.value,
    success:function(msg){
    if(msg=="ok"){   
   showtipex(vusername.id,"<img src='images/ok.gif'/><b><font color='#ffff00'>¸ÃÓû§Ãû¿ÉÒÔʹÓÃ</font></b>",false)
      return true;
    }
    else
    {    
    showtipex(vusername.id,"<img src='images/cancel.gif'/><b><font color='#ffff00'>¸ÃÓû§Òѱ»×¢²á</font></b>",false);
      vusername.className="bigwrong";
      return false;
    }
    }
  });
  }
 µ«ÊÇÎÒÃǵ÷ÓÃÕâ¸ögetReturnAjax()·¢ÏÖʼÖÕÈ¡µÃµÄ¶¼ÊÇfalse,ÄǾÍÊÇ˵return true,return false¸ù±¾Ã»ÓÐÆð×÷Óã¬ÔÚ»ðºüÏÂÓÃfirebugµ÷ÊÔÒ²Ö¤Ã÷£¬´úÂë¸ù±¾²»»áÖ´Ðе½return ²¿·Ö¡£
ÎÒÃÇÊÔÏëÔÚº¯ÊýÀïÏȶ¨ÒåÒ»¸ö±äÁ¿£¬È»ºóÔÚajaxÀ︳ֵ£¬×îºóÔÚº¯ÊýµÄĩβ·µ»ØÕâ¸ö±äÁ¿£¬»á²»»áÓÐЧ¹ûÄØ?ÎÒÃÇ°Ñ´úÂëÐÞ¸ÄÈçÏ£º
´úÂë
function getAjaxReturn()   
{
       var bol=false;
  $.ajax({
    type:"POST",
    url:"ajax/userexist.aspx",
    data:"username="+vusername.value,
    success:function(msg){
    if(msg=="ok"){   
   showtipex(vusername.id,"<img src='images/ok.gif'/><b><font color='#ffff00'>¸ÃÓû§Ãû¿ÉÒÔʹÓÃ</font></b>",false)
      // return true;
&nb


Ïà¹ØÎĵµ£º

Ajax ÔÚÓû§¿Ø¼þÖеÄÓ¦Óã¨ÒÔGoogle SuggestΪÀý£©

ʼþ´¥·¢£º
 <input name="keyword" onkeyup="LoadResults(this.value)" id="keyword" runat="server"/>
¿Í»§¶ËÖ÷Ì壺
//¶¨ÒåÓû§¿Ø¼þIDÈ«¾Ö±äÁ¿
var ClientID;
function ShowDiv(divid)
{
//...
}
function HideDiv(divid)
{
//...
}
//Ò³Ãæ¼ÓÔØʱµÄ´¦Àí
function BodyLoad()
{
HideD ......

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

Ç°ÑÔ£º
»ùÓÚuchomerµÄ²å¼þÈç¹ûûÓÐʹÓÃajax»òflex£¬¿ÉÒÔ˵ÎÞÂÛÈçºÎÒ²×ö²»µ½ÍêÃÀµÄ¡£¶øÏà±ÈÓÚflex£¬ajaxʹÓõĽ϶ࡣºÃ¶à²å¼þ¿ª·¢ÕßÔÚÑо¿
uchomeµÄajaxµÄʹÓùý³ÌÖл¨·ÑÁ˲»ÉÙʱ¼ä£¬´ËÎÄÒâÔÚ¼õÉÙ²å¼þ¿ª·¢ÕßµÄÑо¿Ê±¼ä¡£flexÏà¹Ø²å¼þµÄ˵Ã÷£¬¾´Çë¹Ø×¢£¡
´ËÎÄÕûÀí»¨Á˱¾Í¬Ñ§4¸öСʱÒÔÉϵÄʱ¼ä£¬Èç¹û°æÖ÷¾õµÃ¶Ô´ó¼ÒÓаïÖú£¬ ......

AjaxÀïµÄonreadystatechangeµÄ×÷ÓÃÊÇʲô

·¢ËÍÒ»¸öÇëÇóºó£¬¿Í»§¶ËÎÞ·¨È·¶¨Ê²Ã´Ê±ºò»áÍê³ÉÕâ¸öÇëÇó£¬ËùÒÔÐèÒªÓÃʼþ»úÖÆÀ´²¶»ñÇëÇóµÄ״̬£¬XMLHttpRequest¶ÔÏóÌṩÁËonreadyStateChangeʼþʵÏÖÕâÒ»¹¦ÄÜ¡£ÕâÀàËÆÓڻص÷º¯ÊýµÄ×ö·¨¡£
onreadyStateChangeʼþ¿ÉÖ¸¶¨Ò»¸öʼþ´¦Àíº¯ÊýÀ´´¦ÀíXMLHttpRequest¶ÔÏóµÄÖ´Ðнá¹û£¬È磺
ajaxObj=createAjaxObject();
var url= ......

AJAXѧϰ±Ê¼ÇÒ»

Ç°¶Îʱ¼ä×öÏîÄ¿Óõ½GWT£¬´Ó¶ø½Ó´¥µ½AJAXÕâ¸öÃû´Ê£¬ÏÖÔڻعˣ¬¾õµÃÓбØÒª¼Ç¼ÏÂÀ´Ñ§Ï°µÄÄÚÈÝ¡£
AJAXÊÇÒ»ÃÅ×ۺϼ¼Êõ£¬×îÔç³öÏÖÔÚ1998Ä꣬´óÁ¿±»Ê¹ÓÃÊÇ´Ó2005Ä꿪ʼ¡£×î´óµÄÓŵãÊÇ£¬²»¸üÐÂÕû¸öÒ³ÃæµÄÇ°ÌáÏÂά»¤Êý¾Ý£¬Ó¦ÓÿÉÒÔ½öÏò·þÎñÆ÷·¢ËͲ¢È¡»Ø±ØÐèµÄÊý¾ÝʹµÃÇ°¶ËºÍ·þÎñÆ÷µÄ½»»¥Ê±¼ä¶Ì¡£×î´óȱµãÊÇ£¬²»Äܱ£´æÀúʷ״̬£¬¼´² ......

ÈçºÎÔÚ sharepointÀïÃæ ʹÓÃajax ºÍ ajaxtoolkit £¿

ÈçºÎÔÚ sharepointÀïÃæ ʹÓÃajax ºÍ ajaxtoolkit Õâ¸öÎÊÌâÎÒ֮ǰȥ°Ù¶ÈºÍGoogle¸ö¶à´Î£¡»ù±¾É϶¼ÊÇ˵µÄÐÞ¸ÄÕ¾µãÏÂÃæµÄÅäÖÃÎļþ£¡ºÙºÙµ±È»ÎÒÕâÀïÒ²ÊÇÐÞ¸ÄÅäÖÃÎļþ£¡
ÏÂÃæÊÇÎÒÔÚmsdnÌáµÄÎÊÌâÕâ¸öÎÊÌ⣡ °´ÕÕ΢ÈíÀïÃæÈËԱ˵µÄ²½ÖèÅäÖÃ
http://social.microsoft.com/Forums/zh-CN/partnercndevsharepoint/thread/2d63d004-ef0 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ