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

AJAXÅжÏÓû§ÃûÊÇ·ñ±»×¢²á

ÓõıêÇ©ÓÐScriptManager£¬UpdatePanel£¬UpdateProgress £¬Ö÷ÒªµÄÊÇUpdatePanelÖеÄTriggersÊôÐÔÒ»¶¨Òª¶Ô¡£
ǰ̨´úÂë
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtName" runat="server" OnTextChanged="txtName_TextChanged" AutoPostBack="true" ></asp:TextBox>
<asp:Literal ID="ltlName" runat="server" ></asp:Literal>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="txtName" EventName="TextChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
ÕýÔÚ¸üÐÂÖÐ...
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</form>
ºǫ́´úÂë
protected void txtName_TextChanged(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(2000); //ΪÁË¿´Çå³þUpdateProgressµÄ¹ý³Ì
if (txtName.Text == "123")
{
ltlName.Text = "ÒѾ­±»×¢²á";
}
else
{
ltlName.Text = "¿ÉÒÔ×¢²á";
}
}


Ïà¹ØÎĵµ£º

Jquery ÖÐAjaxʹÓõÄËÄÖÖÇé¿ö

<script type="text/javascript" language="javascript" src="JS/jquery-1[1].2.3.min.js"></script>
    <script type="text/javascript" language="javascript">
    $(document).ready(function(){   //Jquery Ò³Ãæ¼ÓÔØʼþ£¬µ±Ò³Ãæ¼ÓÔØÖ®ºóÊ× ......

jQuery Ajax È«½âÎö

jQueryȷʵÊÇÒ»¸öͦºÃµÄÇáÁ¿¼¶µÄJS¿ò¼Ü£¬ÄÜ°ïÖúÎÒÃÇ¿ìËٵĿª·¢JSÓ¦Ó㬲¢ÔÚÒ»¶¨³Ì¶ÈÉϸıäÁËÎÒÃÇдJavaScript´úÂëµÄÏ°¹ß¡£
·Ï»°ÉÙ˵£¬Ö±½Ó½øÈëÕýÌ⣬ÎÒÃÇÏÈÀ´¿´Ò»Ð©¼òµ¥µÄ·½·¨£¬ÕâЩ·½·¨¶¼ÊǶÔjQuery.ajax()½øÐзâ×°ÒÔ·½±ãÎÒÃÇʹÓõķ½·¨£¬µ±È»£¬Èç¹ûÒª´¦Àí¸´ÔÓµÄÂß¼­£¬»¹ÊÇÐèÒªÓõ½jQuery.ajax()µÄ(Õâ¸öºóÃæ»á˵µ½).
1. ......

AJAXµÄºËÐÄ

XMLHttpRequestÊÇAjax¼¼ÊõÌåϵÖÐ×îΪºËÐĵļ¼Êõ¡£È±ÉÙÁËËü£¬AjaxµÄÆäÓ༼Êõ¾ÍÎÞ·¨³ÉΪһ¸öÓлúµÄÕûÌ壬½«»áÍÁ±ÀÍ߽⡣
¡¡¡¡1999ÄêÉÏ°ëÄ꣬MSÔÚIE 5.0°æÖÐÊ×´ÎÖ§³ÖÕâÖÖ¼¼Êõ£¬ËûÃÇÊÇͨ¹ýÒ»¸öÃûΪXMLHTTPµÄActiveX¶ÔÏóÀ´Ö§³ÖÕâÖÖ¼¼ÊõµÄ¡£XMLHTTP¶ÔÏóʹµÃÒ³ÃæÖеĽű¾¾ßÓÐÁËÔÚ²»Ë¢ÐÂÒ³ÃæµÄÇé¿öÏÂÖ±½ÓÓë·þÎñÆ÷ͨÐŵÄÄÜÁ¦¡£ÔÚ´ËÖ ......

AjaxÌá½»Êý¾Ý¸üзþÎñÆ÷neir

  1£¬±¾Àý×ÓʵÏÖÒ»¸öAjax¸ü¸ÄÊý¾ÝµÄÀý×Ó
Èçͼ£º
1£¬Ð½¨xmlÎļþ£»ÆäÄÚÈÝÈçÏ£º
<?xml version="1.0" encoding="utf-8"?>
<userinfo>
<user>
<id>I</id>
<name>wtq</name>
<password>123456</password>
<phone>0595-8553 ......

Squery¿ò¼ÜÖ®AJAX¿Ø¼þ ¼ÌÐø¿ª·¢ÖÐ

ÒÔºó˵Ã÷¾ÍдÔÚÕâÀïÁË,¸Ã¿Ø¼þÖ»µ±ÊÇÁ·ÊÖ ÎÒ°Ñ˵Ã÷Ò»Æð´ò°üÁË ²»¹ý»¹ÊÇÔÚÕâÀï¶øÔÚÌù³öÀ´ ÎÒÓпյÄʱºò¾Í»áÀ©Õ¹ÆäËû¹¦ÄÜÁË
¸ßÊ־ͿÉÒÔÆ®¹ýÁË...  ÿ´Î¸üÐÂÎÒ¶¼»á°ÑÔ­À´µÄ¿Ø¼þÒ»Æð´ò°ü Îļþ¿ÉÄÜÔ½À´Ô½´ó,ºÇºÇ »¶Ó­½»Á÷
Ax¿Ø¼þÓÃÓÚajaxÇëÇó
Ö§³Öä¯ÀÀÆ÷ »ðºü IE µÈ...
¿Ø¼þ²ÎÊý
 _Async ÊÇ·ñͬ²½ trueΪÒì²½ fals ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ