¶ÔAjaxµÄһЩdzÏÔÀí½â
ÏÖÔÚ¸Õ¸Õ¿´Ò»Ð©¹ØÓÚAjaxµÄһЩ֪ʶµã¡£°ÑËüдÏÂÀ´£¬×÷Ϊ֪ʶµÄ±¸Íü¼£¡
ÒÔÏ´¿Êô¸öÈËÀí½â£¡£¡£¡
1. Ajax·ÖΪҳÃ沿·Ö£¨Ç°¶Ë£©£¬ºÍºǫ́´¦Àí²¿·Ö£¨ºó¶Ë£¬servlet£©£»
2. Ò³Ã棺´´½¨XmlHttpRequest¶ÔÏ󣬲»Í¬µÄä¯ÀÀÆ÷£¬ËùÖ§³ÖµÄXmlHttpRequest¶ÔÏó²»Í¨£»
Ò³Ã棺½¨Á¢·¢Ëͺ¯Êý XmlHttpRequest.open("GET", url, true);
XmlHttpRequest.onreadystatechange = processResponse;
XmlHttpRequest.send(null); //XmlHttpRequest.send("uname=" + "lc")
ÔÚopenº¯Êý£¬µÚÒ»¸ö²ÎÊý£º´ú±íÇëÇóµÄ·½·¨£¬ÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇget£¬ÁîÒ»ÖÖÊÇpost
µÚ¶þ¸ö²ÎÊý£ºÌá½»¸øÄĸöÍøÒ³»òÕßservlet
µÚÈý¸ö²ÎÊý£ºtrue±íʾÒì²½
ÔÚsendº¯Êý£º±íʾÌá½»¸øservletµÄ²ÎÊý¡£¿ÉÒÔÊǼòµ¥µÄ¼üÖµ¶Ô²ÎÊý£¬Ò²¿ÉÒÔÊÇÕû¸öXMLÎĵµ
ÓÃget·½·¨Ìύʱ£¬²ÎÊýÊǸúÔÚurl»òlogin.do?uname=lcºóÃ棻
ÓÃpost·½·¨Ìύʱ£¬¿ÉÒÔÌá½»¸´ÔÓµÄÊý¾Ý£¬±ÈÈ磬XMLÎĵµ£¬
µ«ÓÃpostÌύʱÐèÒª¸úÉÏ£¬XmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form- &nbs
Ïà¹ØÎĵµ£º
2.1Microsoft Ajax LibraryËÙÀÀ£º
Microsoft Ajax LibraryÊÇÒ»×é¿ÉÒÔä¯ÀÀÆ÷¶Ë¶ÀÁ¢ÔËÐеÄJavaScriptº¯Êý¿â£¬°üº¬ÍøÒ³ºËÐÄ·þÎñÒÔ¼°Ìṩä¯ÀÀÆ÷µÄXMLÔ¶³ÌÊý¾Ý´æÈ¡ÄÜÁ¦¡£
Ö§³ÖµÄä¯ÀÀÆ÷ÓУºIE¡¢Mozilla¡¢Firefox¡¢Apple Safari¡£
2.1.2ÔÚASP.NETÒ³ÃæÖÐÔö¼ÓAjaxÖ§³Ö
Ajax LibraryÊÇרΪAjax¹¦ÄÜÌṩµÄScript£¬ËüÊ ......
index.aspÎļþ ±£´æutf-8
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<form id="form1" name="form1" method="post">
<input name="ip" type="text" id="ip" style="width:170px" />
</form>
<mce:script type="text/javascript" src="ajaxrequest-m ......
ÔÚÒ»¸öÏîÄ¿Öзּ¶Ñ¡ÔñÐÐÕþÇø»®Ê±Óõ½AJAX½øÐÐÎÞˢм¶Áª£¬ÎÒÔÚÒ³ÃæÖбàÂëÓõÄÊÇUTF-8£¬×ÜÊDZ¨½Å±¾´íÎó£¬
ÎÒ°ÑÒ³Ãæ±àÂë»»³ÉGBKÓÖÊÇÕý³£µÄ£¬ºóÀ´ÔÚÍøÉÏËÑË÷ÁËһϣ¬ÔÚÒýÈëJSʱ¼ÓÈë±àÂë¾Í¿ÉÒÔÁË£¬ÈçÏ£º
<script language="Javascript" src="js/jquery.js" charset="gb2312"></script> ......
Dojo1.3.x
µÄ
Ajax
ʾÀý
ÕûÀíÈË£º»Æ³Ï
QQ
Ⱥ£º
65643887
ÕâƪÎÄÕÂÖ÷ÒªÊÇ°ïÖú¶Ô
Dojo
¸ÐÐËȤµÄÅóÓÑÃÇ¿ì
ËÙʵÏÖÍøÕ¾ÉϵÄÀý×Ó¡£
http://sitepen.com/labs/guides/?guide=DojoQuickStart#Ajax
Ëü½Ì³Ì·ÖÁË
3
²¿·Ö£¬ÆäÖеÄÀý×Ó²»ÈÝÒ×
ÉÏÊÖ¡£ÎÒÕâÀïÌṩһ¸ö´ò°üÎļþ
AjaxWithDojo.war
ÏÂÃæÎÒ½«Ïêϸ˵Ã÷²Ù×÷²½Ö ......