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

Ajax µÄ״̬½éÉÜ

ÔÚ¡¶Pragmatic Ajax A Web 2.0 Primer ¡·ÖÐżȻ¿´µ½¶ÔreadyStae״̬µÄ½éÉÜ£¬¸Ð¾õÕâ¸ö½éÉܺÜʵÔÚ£¬ÕªÒëÈçÏ£º
0: (Uninitialized) the send( ) method has not yet been invoked.
1: (Loading) the send( ) method has been invoked, request in progress.
2: (Loaded) the send( ) method has completed, entire response received.
3: (Interactive) the response is being parsed.
4: (Completed) the response has been parsed, is ready for harvesting.
0 £­ £¨Î´³õʼ»¯£©»¹Ã»Óе÷ÓÃsend()·½·¨
1 £­ £¨ÔØÈ룩Òѵ÷ÓÃsend()·½·¨£¬ÕýÔÚ·¢ËÍÇëÇó
2 £­ £¨ÔØÈëÍê³É£©send()·½·¨Ö´ÐÐÍê³É£¬ÒѾ­½ÓÊÕµ½È«²¿ÏìÓ¦ÄÚÈÝ
3 £­ £¨½»»¥£©ÕýÔÚ½âÎöÏìÓ¦ÄÚÈÝ
4 £­ £¨Íê³É£©ÏìÓ¦ÄÚÈݽâÎöÍê³É£¬¿ÉÒÔÔÚ¿Í»§¶Ëµ÷ÓÃÁË
¶ÔÓÚreadyStateµÄÕâÎåÖÖ״̬£¬ÆäËûÊéÖдó¶¼ÓïÑɲ»Ïê¡£Ïñ¡¶Foundations of Ajax¡·ÖУ¬Ö»ÔÚÊéÖеıí2-2¼òµ¥µØÁоÙÁË״̬µÄ“Ãû³Æ”£­£­The state of the request. The five possible values are 0 = uninitialized, 1 = loading, 2 = loaded, 3 = interactive, and 4 = complete¡£¶ø¡¶Ajax in Action¡·ÖÐËÆºõ¸ù±¾¾ÍûÓÐÌáµ½Õâ5ÖÖ״̬µÄϸ½Ú¡£
¡¶Professional Ajax¡·ÖÐËä²»¾¡ÈËÒ⣬µ«»¹ÊÇÓпÉȡ֮´¦£º
There are five possible values for readyState:
0 (Uninitialized): The object has been created but the open() method hasn’t been called.
1 (Loading): The open() method has been called but the request hasn’t been sent.
2 (Loaded): The request has been sent.
3 (Interactive). A partial response has been received.
4 (Complete): All data has been received and the connection has been closed.
readyStateÓÐÎåÖÖ¿ÉÄܵÄÖµ£º
0 (δ³õʼ»¯)£º (XMLHttpRequest)¶ÔÏóÒѾ­´´½¨£¬µ«»¹Ã»Óе÷ÓÃopen()·½·¨¡£
1 (ÔØÈë)£ºÒѾ­µ÷ÓÃopen() ·½·¨£¬µ«ÉÐδ·¢ËÍÇëÇó¡£
2 (ÔØÈëÍê³É)£º ÇëÇóÒѾ­·¢ËÍÍê³É¡£
3 (½»»¥)£º¿ÉÒÔ½ÓÊÕµ½²¿·ÖÏìÓ¦Êý¾Ý¡£
4 (Íê³É)£ºÒѾ­½ÓÊÕµ½ÁËÈ«²¿Êý¾Ý£¬²¢ÇÒÁ¬½ÓÒѾ­¹Ø±Õ¡£
ÔÚ¡¶Understanding AJAX: Using JavaScript to Create Rich Internet Applications¡·ÖУ¬ÔòÓÃÏÂ±í½øÐÐÁË˵Ã÷£º
readyState Status Code
Status of the XMLHttpRequest Object
(0) UNINITIALIZED δ³õʼ»¯
The object has been created but not initialized. (The open method has not been called.)


Ïà¹ØÎĵµ£º

ajax°²×°


web2.0ºá¿Õ³öÊÀ£¬ajaxÊ×µ±Æä³å£¬½ñÌì×öwebµÄÈç¹ûÔÙ²»Ñ§µãajaxµÄ»°£¬¾ÍÏÔµÄÂäÎéÁË£¬¶øÑ§ajaxµÄÓõĻ·¾³Èç¹ûÊÇasp.net£¬ÄÇajax.netÄã¾Í²»µÃ²»Ñ§ÁË¡£Ê×ÏȾÍÊÇ»·¾³µÄÅäÖã¬ÈçÏÂ
vs2005+sql2005+Winxp sp2+ie6.0+Office2003»·¾³ÉèÖÃÈçÏ£º
ÏÂÔØÍê ASPAJAXExtSetup.msi °²×°¸üкóÔÚÄãµÄϵͳÅÌϵģ¨ÒÔCÅÌΪÀý£© ³öÏÖÕâ¸ö Îļ ......

PHP+AjaxʵÏÖTabЧ¹û

ÓÃAjaxʵÏÖTabЧ¹ûµÄ
ÏÈ´´½¨
ajax.php£¬ÔÚÆäÖÐÊäÈëÈçÏ´úÂ룺
<!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>
<title>Sample 2_1</title>
<me ......

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 XMLHttpRequest post get

/*ÔÚÓÐÖÐÎIJÎÊýʱ,½ÓÊÕ·½ÐèҪʹÓÃUTF-8·½Ê½¶ÔÊý¾Ý½øÐнâÂë
*²»Ö§³Öpost¸½¼þ
*/
function getXmlHttpRequest() {
    var xmlHttpRequest = null;
    try {
        xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } ......

Asp.net AJAX Web Serviceµ÷ÊÔ

  ¸ÕѧϰASP.NET AJAX¿ª·¢£¬½ñÌìÓöµ½Ò»¸öÆæ¹ÖµÄÎÊÌ⣬¿ÉÄÜÊÇ×Ô¼º²»ÊìµÄÔ­Òò£¡£¡
ÔÚvs2005Æô¶¯µÄʱºò£¬ÔÚasmxÎļþÖУ¬Ìí¼Ó¶Ïµã£¬Æô¶¯µ÷ÊÔÄÜÕý³£½øÈëµ½µ÷ÊÔÒ³Ãæ£¬È»ºóÐÞ¸ÄasmxÒ³ÃæÒÔºó£¬
ÖØÐÂÆô¶¯µ÷ÊÔ£¬¾Í²»ÄÜÕý³£½øÈëµ½asmxÎļþÖеĶϵ㣬¶øÇÒÎļþÐ޸ĵĵط½£¬¶ÔÓÚÒ³Ãæµ÷ÓÃÖ±½ÓÎÞЧ£¬ÏÔʾЧ¹ûʼÖÕÊÇÐÞ¸ÄǰµÄЧ¹û£¡£¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ