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

AjaxµÄ¼òµ¥Ó¦ÓÃ

ǰ̨´úÂ룺
<head runat="server">
    <title>ÎÞ±êÌâÒ³</title>
    <script src="Ajax.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="Name" type="text" onblur="CheckName(this.value)"/>
        <br />
        <div id="TipForName"></div>
    </div>
    </form>
</body>
</html>
"Ajax.js"ÎļþÀïÃæµÄ´úÂë
var xmlHttp;//È«¾ÖXMLHttpResquest¶ÔÏó
//Õë¶Ô²»Í¬ä¯ÀÀÆ÷£¬»ñÈ¡XMLHttpRequest¶ÔÏó
function CreateXMLHttpRequest()
{
    if(window.ActiveXObject)
    {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
        xmlHttp=new XMLHttpResquest();
    }
}
//µ¥»÷btnSayHelloʱµ÷ÓõÄJSº¯Êý
function CheckName(name)
{
    //´´½¨XMLHTTPRquest¶ÔÏó
    CreateXMLHttpRequest();
   
    //Ö¸¶¨»Øµ÷º¯Êý
    xmlHttp.onreadystatechange=HandleStateChange;
   
    //´ò¿ªÇëÇó
//    var s="Output.aspx?id="+name;
    xmlHttp.open("POST","Output.aspx",true);
   
    xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
   
    //·¢ËÍÇëÇó
    xmlHttp.send("id="+name);
   
}
//»Øµ÷º¯Êý
function HandleStateChange()
{
//    alert(xmlHttp.readyState);
    if(xmlHttp.readyState==4)
    {
      


Ïà¹ØÎĵµ£º

10ÖÖAJAX/JavaScriptÌØЧʵÀýÈÃÄãµÄÍøÕ¾¸üÎüÒýÈË

 ½ñÌìµÄ»°ÌâÊÇÈçºÎ¸Ä½ø×Ô¼ºÍøÕ¾µÄ½çÃæ»òÌá¸ßÍøÕ¾µÄÊÓ¾õÌåÑ飬´Ó¶øÈÃÓû§¼ÇÒäÓÌС£
¡¡¡¡ÎÒÃÇÓÐÈýÖÖÖ÷ÒªµÄ·½·¨(´ÓÄѵ½Ò×):×Ô¼º¶¯ÊÖд½Å±¾;ʹÓÃÀàËÆÓÚjQueryºÍmooToolsµÄJavaScript¿ò¼Ü(¿ÉÒÔÈñàд´úÂë±äµÃ¸üÈÝÒ×Щ);ʹÓÃÄܹ¤×÷ÓÚÏÖÓеÄJavaScript¿ò¼ÜϵÄÌáÇ°Ô¤ÖúõĽű¾»òÄÇÖÖ´ÓÍ·¿ªÊ¼¿ª·¢µÄ´´½¨Õß¡£ÕâƪÎÄÕÂÊʺÏÄÇ ......

AJAX¡¢DOM£¬Ãû´Ê½âÊÍ

£¨ÒÔÏÂÀ´×ÔWIKI£©
      AJAXÈ«³ÆΪ“Asynchronous JavaScript and XML”£¨Òì²½JavaScriptºÍXML£©£¬ÊÇÒ»ÖÖ´´½¨½»»¥Ê½ÍøÒ³Ó¦ÓõÄÍøÒ³¿ª·¢¼¼Êõ¡£¸ù據AjaxÌá³öÕßJesse James Garrett½¨議[1]£¬Ëü£º
ʹÓÃXHTML+CSSÀ´±íʾÐÅÏ¢£»
ʹÓÃJavaScript²Ù×÷DOM£¨Document Object Model£©½øÐ ......

visual studio 2008 °²×°AJAX Version 3.0.30930

1.µ½http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33804
ÏÂÔØAJAX Control Toolkit - Binary
2.½âѹµ½C:\Program Files\Microsoft.NET\ADOMD.NET\90
3.visual studio н¨Ò»ÍøÕ¾£¬Ë«»÷default.aspx
4.´ò¿ª¹¤¾ßÏ䣬ÓÒ»÷н¨Ò»Ñ¡Ï£¬Ã÷ÃûΪAjax Control Toolkit
5.ÓÒ»÷Ajax Contr ......

AJAX ¿ò¼ÜJqueryµÄʹÓ÷½·¨

 AJAX Á÷ÐÐÖ®ºó£¬×ÜÏëºÃºÃѧϰһÏ¡£µ«ÊÇÖÚ¶àµÄ¿ò¼ÜʵÔÚÄÑÒÔÑ¡Ôñ¡£ËµÃ÷һϠASP.NET AJAX ²¢²»°üÀ¨ÔÚ AJAX ¿ò¼ÜÖ®ÖС£
¸Õ¿ªÊ¼Ñ§ÁË JQuqery£¬ ÖÚ¶àµÄ $get(),...µÈµÈ·ûºÅÔçÒÑ°ÑÎÒ¸ãÔÎÁË¡£ÔÝʱ¾Í·ÅÆúÁË¡£
ºóÀ´Ñ§Ï° ASP.NET AJAX £¬ÔÚ΢ÈíµÄÁ쵼ϣ¬Öð½¥ÓÉ·þÎñÆ÷¶ËתÏò¿Í»§¶Ë±à³Ì¡£ ¼¤ÆðÎÒ¿Í»§¶Ë±à³ÌµÄÐËȤ£¬
²ÅÏëÆðѧ ......

ÓÃAjax¶ÁÈ¡xmlÎļþµÄ¼òµ¥Àý×Ó

 AjaxµÄÔ­ÀíºÜ¼òµ¥£¬¾ÍÊÇÔÚ¿Í»§¶Ë´´½¨Ò»¸öXMLHttpRequest¶ÔÏó£¨ÓÃÀ´Óë·þÎñÆ÷½øÐÐÒ첽ͨÐÅ£¬Õâ¾ÍÊÇAjaxµÄºËÐÄ£¬ÆäʵÎÒÃÇÔç¾ÍÔÚÓÃÒ첽ͨÐÅÁË£¬Ö»ÊÇû°ÑÕâÏî¼¼ÊõÓÃÔÚÍøÒ³Éè¼ÆÖжøÒÑ£©£¬Îª¸Ã¶ÔÏóµÄonreadystatechange ÊôÐÔÌí¼ÓÒ»¸öʼþ£¬µ±¶ÔÏóµÄreadyState¸Ä±äµÄʱºò¾Í»áÒý·¢Ö¸¶¨µÄʼþ¡£µ½´Ë¾Í¿ÉÒԾͷ¢ËÍÇëÇó¶ÁÈ¡·þÎñÆ÷¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ