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

´´½¨ajaxÖеÄxmlhttprequest¶ÔÏó

<html>
<body>
<script type="text/javascript">
function ajaxFunction()
{
var xmlHttp;
try
    {
   // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
catch (e)
    {
  // Internet Explorer
   try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
   catch (e)
      {
      try
         {
         xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
      catch (e)
         {
         alert("ÄúµÄä¯ÀÀÆ÷²»Ö§³ÖAJAX£¡");
         return false;
         }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
         document.myForm.time.value=xmlHttp.responseText;
        }
      }
    xmlHttp.open("GET","time.asp",true);
    xmlHttp.send(null);
}
</script>
<form name="myForm">
Óû§: <input type="text" name="username" onkeyup="ajaxFunction();" />
ʱ¼ä: <input type="text" name="time" />
</form>
</body>
</html>


Ïà¹ØÎĵµ£º

jQuery Ajax È«½âÎö

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

¹ØÓÚstruts2ÖÐajax±êÇ©µÄÒ»µãѧϰ±Ê¼Ç

ÆäʵajaxµÄ¶«Î÷²»ÊǺÜÊìϤ£¬¶øÇÒ¶ÔÓÚjavascriptÕâÑùÁãËéµÄÓïÑÔʵÔÚÊǺܿ¹¾Ü¡£ÓÚÊǹýÈ¥Ò»Ö±¶¼ÌÓ±ÜËü£¬ÆÈÓÚÏîÄ¿µÄѹÁ¦£¬²»µÃÒÑΩÓÐÓ²ÅöÓ²ÁË¡£ÎªÁË¿ìËÙÉÏÊÖ£¬Ö®Ç°×öÁ˼¸¸öСʵÑ飬´úÂëʵÔÚÌ«¶àÁË¡£ÐÒºÃstruts2ÌṩÁËһЩajaxµÄ¼òÒ×ʵÏÖ¡£
¸úÍøÉÏËùÓеĽ̳ÌÒ»Ñù£¬ÏÈ´Ó×î¼òµ¥µÄ¿ªÊ¼°É~
ÔÚÍ·½áµã¼ÓÉÏ<s:head theme="ajax"/&g ......

AJAX¼¯³ÉÓÚASP.NET

APS.NETÒ¹»°µÄÀý×Ó¼ÓÔغ󱨴íÈçÏ£º
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35´íÎó
Ô­ÒòÊÇδÄܼÓÔØÎļþ»ò³ÌÐò¼¯ system.web.extensions
½â¾ö°ì·¨:
1,Èç¹ûÄãµÄ³ÌÐòÔËÐÐÔÚÄãÄÜ¿ØÖƵķþÎñÆ÷ÉÏ£¬ÄÇô°²×°asp.net ajax¾ÍÐÐÁË£¬ÕâÊÇSystem.Web.ExtensionsµÈdll×öΪGAC² ......

Asp.net AJAX Web Serviceд·¨²îÒì

ÔÚC#ÖÐ
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
using System.Collections.Generic;
using System.Collections;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.Ba ......

Ajax Ô­Àí

Ajax
Ö÷
Òª×é³É²¿·Ö
Ajax
ÊÇ
Asynchronous JavaScript and XML
£¨ÒÔ
¼°
DHTML
µÈ£©µÄËõд¡£
Ajax
ÓÉ
HTML
¡¢
JavaScript™
¼¼Êõ¡¢
DHTML
ºÍ
DOM
×é³É£¬ÕâÒ»½Ü³öµÄ·½·¨¿ÉÒÔ½«±¿×¾µÄ
Web
½çÃæת»¯³É½»»¥ÐÔµÄ
Ajax
Ó¦ÓóÌÐò¡£
AjaxµÄºËÐÄÊÇJavaScript¶ÔÏó XmlHttpRequest¡£¸Ã¶ÔÏóÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ