ÓÃAjax¶ÁÈ¡xmlÎļþµÄ¼òµ¥Àý×Ó
AjaxµÄÔÀíºÜ¼òµ¥£¬¾ÍÊÇÔÚ¿Í»§¶Ë´´½¨Ò»¸öXMLHttpRequest¶ÔÏó£¨ÓÃÀ´Óë·þÎñÆ÷½øÐÐÒ첽ͨÐÅ£¬Õâ¾ÍÊÇAjaxµÄºËÐÄ£¬ÆäʵÎÒÃÇÔç¾ÍÔÚÓÃÒ첽ͨÐÅÁË£¬Ö»ÊÇû°ÑÕâÏî¼¼ÊõÓÃÔÚÍøÒ³Éè¼ÆÖжøÒÑ£©£¬Îª¸Ã¶ÔÏóµÄonreadystatechange ÊôÐÔÌí¼ÓÒ»¸öʼþ£¬µ±¶ÔÏóµÄreadyState¸Ä±äµÄʱºò¾Í»áÒý·¢Ö¸¶¨µÄʼþ¡£µ½´Ë¾Í¿ÉÒԾͷ¢ËÍÇëÇó¶ÁÈ¡·þÎñÆ÷¶ËµÄXMLÊý¾ÝÁË£¬×îºóÒª×öµÄ¾ÍÊÇ´¦ÀíÊý¾ÝÁË¡£ ¹ØÓÚXMLHttpRequest¶ÔÏó£¬Çë²Î¿¼ About XMLHttpRequest ObjectÒ»ÎÄ¡£
¿´Àý×Ó£º
¸´ÖÆ´úÂë
//AjaxDemo.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Asynchronous java script And XML</title>
</head>
<body>
<script type="text/java script">
var xmlHttp=null;
function readyStateChangeHandle()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
var xmlDOM=xmlHttp.responseXML;
var xmlRoot=xmlDOM.documentElement;
try
{
var xmlItem=xmlRoot.getElementsByTagName("item");
alert(xmlItem[0].firstChild.data);
}
&
Ïà¹ØÎĵµ£º
½â¾öAjax´«ËÍÖÐÎĻᵼÖÂÂÒÂëµÄÎÊÌâ
//Èç¹û´«ËͲÎÊýÊÇÖ±½Ó¸³ÓèµÄ£¬¾Í»á²úÉúÂÒÂë!
http_request.open("POST",url,true);
http_request.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');
http_request.send("action="+strName+"&val="+val);
......
£¨ÒÔÏÂÀ´×ÔWIKI£©
AJAXÈ«³ÆΪ“Asynchronous JavaScript and XML”£¨Òì²½JavaScriptºÍXML£©£¬ÊÇÒ»ÖÖ´´½¨½»»¥Ê½ÍøÒ³Ó¦ÓõÄÍøÒ³¿ª·¢¼¼Êõ¡£¸ù據AjaxÌá³öÕßJesse James Garrett½¨議[1]£¬Ëü£º
ʹÓÃXHTML+CSSÀ´±íʾÐÅÏ¢£»
ʹÓÃJavaScript²Ù×÷DOM£¨Document Object Model£©½øÐ ......
ÉÏ´«Ò³ÃæÖ»ÐèÒªÒ»¸öjsÒýÓúÍjsº¯ÊýµÄµ÷Ó㬼òµ¥·½±ã£¬²»Ó°ÏìÍøÒ³ÔÓв¼¾Ö¡£
ÏÂÔصØÖ·
µ÷ÓÃ˵Ã÷:
1.Ê×ÏÈÒýÓÃjsÎļþ
<script type="text/javascript" src="AienUpload/init.js"></script>
2.½«º¯Êýµ÷ÓÃ(showUpload(boxCtrl,inputCtrl,upPath,maxCount,fn);)°ó¶¨µ½HTMl¿Ø¼þʼþ£¬ÀýÈç
......
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
jQueryÊÇÒ»¿îÃâ·ÑÇÒ¿ª·ÅÔ´´úÂëµÄJavaScript´úÂë¿â£¬ÓÉJohn Resig´´½¨¡£ÊÚȨÐÒéΪGPLºÍMITÐí¿É֤˫ÐÒ顣ʾÀý´úÂ룺 $("p.neat").addClass("ohmy").show("slow"); ÌصãÇáÁ¿¼¶¾GZipѹËõºó´«ÊäµÄ´úÂëÎļþ½ö14KB£¬Î´¾Ñ¹Ëõ´«Ë͵ĴúÂëÎļþ½ö26KB¡£ jQuery 1.26°æʱ£º µµ°¸µµ°¸ÐÐÊýµµ°¸Size ±¸×¢ jquery-1.2 ......