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

Ajaxѧϰ±Ê¼Ç£¨Ò»£©

    ¶ÔÓëÈÎÒâÒ»ÃÅÓïÑÔµÄѧϰ£¬ÎÒÃÇ´ó¶¼ÊÇ´Ó»ù´¡¿ªÊ¼£¬¶ø¶ÔÓÚAjaxµÄѧϰÎÒÃÇ´ó¿É²»±Ø£¬ÒòΪËü±¾Éí¾Í²»ÊÇÒ»ÃÅеÄÓïÑÔ£¬Ajax=Asynchronous javascript and xml¡£·ôdzµÄ˵£¬Ëü¾ÍÊÇ»ù±¾ÓïÑÔ»ìºÏÓ¦ÓõĽá¹û£¬ÕýÓÉÓÚÕâÖÖ»ìºÏ²»ÊÇËæÐÄËùÓû£¬ÈÎÒâ¹´¶ÒµÄ£¬²Å  ÓÐÁ˳Éϵͳ£¬³É¹æ·¶µÄAjax¡£
Ϊ´Ë£¬ÎÒÃÇÒ»¿ªÊ¼¾Í´ÓÒ»¸ö¼òµ¥µÄAjaxÓ¦ÓÿªÊ¼£¬Á˽â¸÷ÖÖ¼¼ÊõµÄ×÷Óã¬ÒÔ¼°ËüÃÇÖ®¼äÇÉÃîµÄÏνÓ×÷Óãº
   Ajax´ø¸øÎÒÃǵģº
ͨ¹ý Ajax£¬ÄúµÄ JavaScript ¿ÉʹÓà JavaScript µÄ XMLHttpRequest ¶ÔÏóÀ´Ö±½ÓÓë·þÎñÆ÷½øÐÐͨÐÅ¡£Í¨¹ýÕâ¸ö¶ÔÏó£¬ÄúµÄ javascript ¿ÉÔÚ²»ÖØÔØÒ³ÃæµÄÇé¿öÓë Web ·þÎñÆ÷½»»»Êý¾Ý
AjaxÔÚä¯ÀÀÆ÷Óë Web ·þÎñÆ÷Ö®¼äʹÓÃÒì²½Êý¾Ý´«Ê䣨HTTP ÇëÇ󣩣¬ÕâÑù¾Í¿ÉʹÍøÒ³´Ó·þÎñÆ÷ÇëÇóÉÙÁ¿µÄÐÅÏ¢£¬¶ø²»ÊÇÕû¸öÒ³Ãæ¡£
Ajax¿ÉʹÒòÌØÍøÓ¦ÓóÌÐò¸üС¡¢¸ü¿ì£¬¸üÓѺá£
AjaxÊÇÒ»ÖÖ¶ÀÁ¢ÓÚ Web ·þÎñÆ÷Èí¼þµÄä¯ÀÀÆ÷¼¼Êõ¡£
  Á˽âAjaxµÄºËÐĶÔÏóXMLHttpRequest:
 
    ÎÒÃÇÓбØÒªÁ˽âÒ»ÏÂXMLHttpRequest¶ÔÏóµÄÈý¸öÖØÒªÊôÐÔ¡£
    1.onreadystatechangeÊôÐÔ
    onreadystatechangeÊôÐÔ´æÓд¦Àí·þÎñÆ÷ÏìÓ¦µÄº¯Êý
    e.g:xmlHttp.onreadystatechange=function(){ дÉÏÎÒÃÇÐèÒªËü×öµÄÊ }
    2.readyStateÊôÐÔ
    readyStateÊôÐÔ´æÓзþÎñÆ÷ÏìÓ¦µÄ״̬ÐÅÏ¢¡£Ã¿µ±readyState¸Ä±äʱ£¬onreadystatechangeº¯Êý¾Í»á±»Ö´ÐС£
    ״̬0£ºÇëÇóδ³õʼ»¯£¨ÔÚµ÷ÓÃopen()֮ǰ£©
        1£ºÇëÇóÒÑÌá³ö£¨µ÷ÓÃsend()֮ǰ£©
        2£ºÇëÇóÒÑ·¢ËÍ£¨¿ÉÒÔ´ÓÏìÓ¦µÃµ½ÄÚÈÝÍ·²¿£©
        3£ºÇëÇó´¦ÀíÖУ¨ÏìÓ¦ÖÐͨ³£Óв¿·ÖÊý¾Ý¿ÉÓ㬵«·þÎñÆ÷»¹Ã»ÓÐÍê³ÉÏìÓ¦£©
        4£ºÇëÇóÒÑÍê³É£¨¿ÉÒÔ·ÃÎÊ·þÎñÆ÷²¢Ê¹ÓÃËü£©
    3.responseTextÊôÐÔ
        ¿ÉÒÔͨ¹ýresponseTextÊôÐÔÀ´È¡»ØÓÉ·þÎñÆ÷·µ»ØµÄÊý¾Ýe.g:xmlHttp.responseText
 
   Ajax¼òµ¥Ê¾Àý£º 
test.htmlÎļþÈçÏ£º
<html>
<head>
<script type="text/javascript">
//²»Í¬µÄä¯ÀÀÆ÷´´½¨XMLHttpRequest¶ÔÏóµÄ·½·¨
func


Ïà¹ØÎĵµ£º

ajax Áª¶¯

function selectTradezone(){
    var copyTradezone = document.forms[0].copyTradezone;
    new BaseTool().ajax("getTradezoneByCity",callback,[document.forms[0].city.value,document.forms[0].brand.value]);
   
    function callba ......

Dojo1.3.xµÄAjaxʾÀý


Dojo1.3.x
µÄ
Ajax
ʾÀý
ÕûÀíÈË£º»Æ³Ï
QQ
Ⱥ£º
65643887
ÕâƪÎÄÕÂÖ÷ÒªÊÇ°ïÖú¶Ô
Dojo
¸ÐÐËȤµÄÅóÓÑÃÇ¿ì
ËÙʵÏÖÍøÕ¾ÉϵÄÀý×Ó¡£
http://sitepen.com/labs/guides/?guide=DojoQuickStart#Ajax
Ëü½Ì³Ì·ÖÁË
3
²¿·Ö£¬ÆäÖеÄÀý×Ó²»ÈÝÒ×
ÉÏÊÖ¡£ÎÒÕâÀïÌṩһ¸ö´ò°üÎļþ
AjaxWithDojo.war
ÏÂÃæÎÒ½«Ïêϸ˵Ã÷²Ù×÷²½Ö ......

12¸öÓÅÐãµÄjavascript(ajax)µ¯³ö²ã

Thickbox

-
»ùÓÚ
jQuery
£¬Ö§³Ö AJAX£¬ÇáÁ¿¼¶µÄ¶øÇұȽϸßЧ¡£Ö§³ÖͼƬÓëHTMLÄÚÈÝ¡£´óСԼΪ
40k£¬Ä¿Ç°»¹¿É×÷Ϊ WordPress
µÄ²å¼þʹÓá£Õâ¸öjsµÄÓŵãÔÚÓÚÓ룬¸¸¼¶µÄÔ­Ò³Ãæ¹ö¶¯ÌõËæÊó±ê¹ö¶¯µÄʱºò£¬µ¯³öµÄ²ã²¢²»Òƶ¯£¬¶øʼÖÕ´¦ÓÚä¯ÀÀÆ÷µÄ¹Ì¶¨Î»Öá£
 
GreyBox

- ´´½¨ iframe µÄµ¯³ö½çÃ棬¿ÉʹÓÃͼƬ ......

Ajaxѧϰ±Ê¼Ç

1¡¢´´½¨
XMLHttpRequest
¶ÔÏóµÄÒ»¸öʵÀý
var xmlHttp;
 
function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if ( ......

AJAXʹÓÃÖеÄ×¢ÒâÊÂÏî

1¡¢µ±¸Ä±ä·þÎñÆ÷ÉϵÄ״̬ʱӦµ±Ê¹ÓÃPOST·½·¨¡£²»Í¬ÓÚGET£¬ÐèÒªÉèÖÃXML- HttpRequest¶ÔÏóµÄContent-TypeÊײ¿£¬ÈçÏÂËùʾ£º
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
ÓëGET²»Í¬£¬POST²»»áÏÞÖÆ·¢Ë͸ø·þÎñÆ÷µÄ¾»ºÉµÄ´óС£¬¶øÇÒPOSTÇëÇó²»Äܱ£Ö¤ÊÇÃݵȵġ£
Äã×öµÄ´ó¶àÊýÇëÇó¿ÉÄܶ¼ÊÇG ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ