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.)
Ïà¹ØÎĵµ£º
APS.NETÒ¹»°µÄÀý×Ó¼ÓÔغ󱨴íÈçÏ£º
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35´íÎó
ÔÒòÊÇδÄܼÓÔØÎļþ»ò³ÌÐò¼¯ system.web.extensions
½â¾ö°ì·¨:
1,Èç¹ûÄãµÄ³ÌÐòÔËÐÐÔÚÄãÄÜ¿ØÖƵķþÎñÆ÷ÉÏ£¬ÄÇô°²×°asp.net ajax¾ÍÐÐÁË£¬ÕâÊÇSystem.Web.ExtensionsµÈdll×öΪGAC² ......
web2.0ºá¿Õ³öÊÀ£¬ajaxÊ×µ±Æä³å£¬½ñÌì×öwebµÄÈç¹ûÔÙ²»Ñ§µãajaxµÄ»°£¬¾ÍÏÔµÄÂäÎéÁË£¬¶øѧajaxµÄÓõĻ·¾³Èç¹ûÊÇasp.net£¬ÄÇajax.netÄã¾Í²»µÃ²»Ñ§ÁË¡£Ê×ÏȾÍÊÇ»·¾³µÄÅäÖã¬ÈçÏÂ
vs2005+sql2005+Winxp sp2+ie6.0+Office2003»·¾³ÉèÖÃÈçÏ£º
ÏÂÔØÍê ASPAJAXExtSetup.msi °²×°¸üкóÔÚÄãµÄϵͳÅÌϵģ¨ÒÔCÅÌΪÀý£© ³öÏÖÕâ¸ö Îļ ......
AJAX×Ô´ÓÒý½øÁËTab£¬×ÅʵÈÃÎÒ¿ªÐÄÁËÒ»·¬¡£µ«ÊÇ£¬ÔÚµ÷ÕûTabµÄÑùʽµÄʱºò£¬Ò²×ÅʵÈÃÎÒ³ÔÁËÒ»¾ª¡£
ÓÚÊÇ£¬±§×ÅûÓÐÀ§ÄÑÒ²ÒªÖÆÔìÀ§ÄѵÄÔÔò£¬¿ªÊ¼ÁËÕ÷;£º
°´ÕÕTab×÷ÕßRonald BucktonËù˵£¬TabµÄCSS°üº¬Èçϼ¸¸öÀࣺ
(1).ajax__tab_header: A container element that wraps all of the tabs at the top of the TabContainer.
......
¸Õ¿ªÊ¼Ñ§Ajax£¬¿´µ½ºÜ¶àÍøÉϵĴúÂ붼ÓÃGet·½·¨Ìá½»²ÎÊý£¬TomcatĬÈÏISO±àÂëʵÔÚÊÇÈÃÈËÍ·Í´£¬¶Ô¸¶ÂÒÂëÎÒ¶¼ÊÇÓùýÂËÆ÷×ö×Ö·û±àÂë¹ýÂ˵ģ¬Get·½·¨¹ýÂËÆ÷¼àÌý²»µ½£¬ËùÒÔÎÒһֱϲ»¶Ê¹ÓÃPost·½·¨£¬ÏÂÃæ¶ÔAjax GetºÍPost·½·¨×öÒ»¶Ô±È
GET£º
view plaincopy to clipboardprint?
<mce:script type="text/javascript"><!- ......
ÔÚ±¾½ÚÎÒ×¼±¸Ö»Ð´ÉϹØÓÚAjaxµÄ˵Ã÷£¬¶àÊýÀ´×ÔjQueryµÄ°ïÖúÎĵµ£¬ËùÒÔ²»Òª·ÅÔÚÊ×Ò³¡£ÒòΪÎÒ¾õµÃÊ×Ò³Ó¦¸ÃÊÇÒª»¨·ÑÁËʱ¼äºÍÐÄ˼µÄ×÷Æ·¡£´úÂëÑÝʾºÍjQuery Ajax һЩеģ¬½«ÔÚÏÂÒ»´ÎÓпÕʱ½²Êö£¬ÕâÀï¾Í²»½²ÁË¡£Ê±¼äÒѾ0³¿ÁË¡£Èç¹ûÄã¾ÙµÃÓÐʲôjQueryµÄÒÉÎÊ»òÕß¾õµÃAjax¸Ã½²ÊöÄÇЩÄÚÈݵĶ¼¿ÉÒÔ¸úÎÒÁô ......