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

ʲôʱºòä¯ÀÀÆ÷¾ß±¸ajax¹¦ÄܵÄ

ajaxË­¸ã³öÀ´µÄ¼¼Êõ°¡

µ½µ×Ôõô»ØÊ°¡£¬ÊÇ΢ÈíŪµÄÂ𣬻¹ÊÇgoogle °¡£¬»¹ÊÇÄĸöä¯ÀÀÆ÷¹«Ë¾°¡

The concept behind the XMLHttpRequest object was originally created by the developers of Outlook Web Access for Microsoft Exchange Server 2000.[4] An interface called IXMLHTTPRequest was developed and implemented into the second version of the MSXML library using this concept.[4][5] The second version of the MSXML library was shipped with Internet Explorer 5.0 in March of 1999, allowing access, via ActiveX, to the IXMLHTTPRequest interface using the XMLHTTP wrapper of the MSXML library
http://en.wikipedia.org/wiki/XMLHttpRequest

ʲôʱºòä¯ÀÀÆ÷¶¼¾ß±¸£¿
Ó¦¸ÃÔÚ2005Ç°ºó°É!ajaxÊÇÔÚ2004.12-2005Äê»ðµÄ!ÏÖÔÚXHRÒÑÄÉÈëµ½ÁËw3cµÄ¹æ·¶ÖÐhttp://www.w3.org/TR/XMLHttpRequest/


Ö§³ÖjavascriptµÄ»ù±¾¶¼Ö§³Öajax

ajax²»ÊÇÒ»ÖÖÌØÊâµÄ¹¦ÄÜ£¬ÊÇÒ»ÖÖ¸ÅÄÆäʵ¼¼ÊõºÜÔçÒÔÇ°¾ÍÓÐÁË

µ½µ×ÊÇÔõô»ØÊ°¡£¬ajaxÊÇÄĸö¹«Ë¾µÄרÀû°¡£¬javascriptÊÇÄĸö¹«Ë¾·¢Ã÷µÄ°¡£¬

ajaxÓõ½µÄһЩ¶ÔÏó£¬ÊÇʲôʱºò¿ªÊ¼ÓеÄÄØ£¬ËûµÄÄÚÔÚ»úÀíÊÇʲôÄØ£¬javascriptÊÇÈçºÎµ÷ÓòÙ×÷ϵͳÀàµÄ°¡

È·ÇеÄ˵ÊÇ΢ÈíµÄÒ»¸öС¶«Î÷±»ÓÐÐÄÈË·¢¾òÁ˳öÀ´£¬´Ó¶ø²úÉúÁËÇ¿´óµÄÉú²úÁ¦¡£

¸çÃÇÄãд±ÏÒµÂÛÎÄô

ÒýÓÃ
µ½µ×ÊÇÔõô»ØÊ°¡£¬ajaxÊÇÄĸö¹«Ë¾µÄרÀû°¡£¬javascriptÊÇÄĸö¹«Ë¾·¢Ã÷µÄ°¡£¬

ajaxÓõ½µÄһЩ¶ÔÏó£¬ÊÇʲôʱºò¿ªÊ¼ÓеÄÄØ£¬ËûµÄÄÚÔÚ»úÀíÊÇʲôÄØ£¬javascriptÊÇÈçºÎµ÷ÓòÙ×÷ϵͳÀàµÄ°¡
ÊÇÕâÑù×ӵġ£

ajaxÊǹȸèÍƹãµÄ°É£¬a


Ïà¹ØÎÊ´ð£º

Hibernate+spting+struts+ajax ÕûºÏÎÊÌâ

´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
......

ÈçºÎ»ñÈ¡AjaxÒ³ÃæÖÐinnerHtml

Èç½ðɽ´Ê°ÔÍøÒ³×óÉϽÇÉϵÄÿÈÕÒ»¾ä
$('#elementID').html();
Ó¦¸Ã¿ÉÒÔ°É

±ð³ÁÁË°¡£¡~£¡

ÎÊÌâ²»¹»ÇåÎú

document.getElementById("¿Ø¼þID").innerHtml;

h ......

jquery¼Óajax Öв»ÄÜʵÏÖÔ¶³ÌÒ³ÃæµÄ¶ÁÈ¡

Èç¹û°ÑÒ³ÃæµØÖ·¸Ä³É±¾µØµÄÎļþ(È磺aa.php)¾Í¿ÉÒÔÕý³£¶ÁÈ¡ÁË¡£
³ÌÐòÈçÏ£º
<script language="javascript" src="jsLibrary/jquery.js"> </script>

<script langu ......

ÔÚphpÀïÓÃajaxÔõô·µ»ØÊý¾Ý¸ø¿Í»§¶Ë

·µ»ØÕâ²½¸ÄÔõô×ö£¿ÎÒÊÇÓÃxmlHttpRequest.responseText·µ»ØÊý¾ÝµÄ
ÔÚ·þÎñ¶ËÎÒÓÃecho array("a"=>111,"b"=>222)Êä³ö
¿Í»§¶ËÓÃtypeof(xmlHttpRequest.responseText) Êä³öÊÇArray£¬µ«Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ