ajax ¼æÈÝÐÔÎÊÌâ½â¾ö ¼¯½õ
ÕâÁ½Ìì¸Õ½â¾öÁËajax¶àä¯ÀÀÆ÷¼æÈݵÄÎÊÌ⣬Ö÷Òª¾ÍÕë¶ÔFirefoxµÄ£¬¿ªÊ¼»¹ÒÔΪFirefox²»Ö§³ÖajaxÄØ£¨±ðЦÎÒѽ£¬²»ÔõôÁ˽âFirefoxҲûÓùý£¬ºÇºÇ£©£¬¶à¿÷¿´ÁËÏÂÃæµÄÎÄÕ²ÅÈÃÎÒÁ˽âajaxµÄÊÊÓ÷¶Î§¡£ÆäʵֻҪ·ûºÏw3cµÄ±ê×¼¾Í¿ÉÒÔÔÚFirefoxµÈÕâЩä¯ÀÀÆ÷ÉÏÕý³£ÏÔʾ£¬ËùÒÔ»¹ÊÇÓ¦¸ÃºÃºÃÁ˽âÒ»ÏÂw3cµÄ±ê×¼¹æÔòѽ¡£²»¹ýÒª½â¾öÑÛÇ°µÄ¼æÈÝÎÊÌâÊ×ÏÈ×¢ÒâÒÔϼ¸µã£º£¨Õâ¸öÒ²ÊÇÍøÉÏÕÒÀ´µÄ£©1,document.getElementByIdÌæ´údocument.all£¨ieÊÊÓã©
2,¼¯ºÏ[]Ìæ´ú()£¨ieÊÊÓã©
3,targetÌæ´úsrcElement;parentNodeÌæ´úparentElement£¨parentNode ieÊÊÓã©
4,node.parentNode.removeChild(node)Ìæ´úremoveNode(this)£¨ieÊÊÓã©
5,DOMMouseScrollÌæ´úonmousewheel;-e.detailÌæ´úevent.wheelDelta
6,addEventListenerÌæ´úattachEvent;removeEventListenerÌæ´údetachEvent
7e.preventDefault()Ìæ´úevent.returnValue=false;e.stopPropagation()Ìæ´úevent.cancelBubble=true
8,style.top¡¢style.leftµÈÑϸñ¼ì²é"px"µ¥Î»£¨¼Ó"px" ieÊÊÓã©
9,style="-moz-opacity:0.9"Ìæ´ústyle="filter:alpha(opacity=90)";ÎÞÆäËüfilter
10,style.cursor="pointer"Ìæ´ústyle.cursor="hand"£¨ieÊÊÓã©
11,titleÌæ´úalt£¨ieÊÊÓã©12.ËùÓеĿռäÔÚÒýÓÃʱ¶¼ÒªÕâÑùÒýÓãºdocument.getElementById£¨“XX”£©¡£
×¢:±êÃ÷“ieÊÊÓÔÕßΪͨÓÃÐÔ½¨Òéд·¨,δ±êÃ÷ÕßÔÚieÀï²»ÊÊÓᣠÏÂÃæ¾ÍÊÇÎÒ¿´µÄÄǸö¹ØÓÚajaxµÄÎÄÕºÜÓÐÓÃû¿´µ½×÷Õߣ¬µ«ÎÞÂÛÈçºÎ¸ÐлÎÄÕÂ×÷Õß¡£——————————————————————————————¼ò½é¡¡¡¡Òì²½JavaScript£«XML£¨¼´Ajax£©£¬ÊÇÒ»ÖÖ´´½¨½»»¥Ê½webÓ¦ÓóÌÐòµÄWeb¿ª·¢¼¼Êõ¡£ÕâÖÖ³ÌÐòʹÓÃJavaScriptºÍXML´Ó¿Í»§¶ËÌá½»·þÎñÆ÷ÇëÇó£¬ÇÒÕû¸ö¹ý³ÌÖнöÐèÒª½»»»ÉÙÁ¿µÄÊý¾Ý¶ø²»±ØÌá½»Õû¸öwebÒ³Ãæ¡£Òò´Ë£¬ÕâÑùµÄ³ÌÐò½«¸ü¿ìºÍ¸ü¾ßÏìÓ¦ÐÔ£¬²¢½«³ÉΪÐÂÒ»´ú¿Í»§»ú-·þÎñÆ÷ϵͳµÄÖØÒª»ù´¡¼¼ÊõÖ®Ò»¡£Äã¿ÉÒÔÔÚÕ¾µãhttp://www.google.com/webhp?complete=1&hl=en´¦¿´µ½Ò»ÖÖÁ¼ºÃµÄAJAXʵ¼ù¼¼Êõչʾ¡£ÔÚ´ËÒ³ÃæÖУ¬Èç¹ûÄã°ÑÈκÎ×ÖĸÊäÈëµ½Îı¾¿òÄÚ£¬ÄÇôËæºó¾Í»á³öÏÖÒ»¸öÏÂÀÁбí¿ò£¬ÆäÖеÄÄÚÈÝÖ±½ÓÀ´×ÔÓÚ·þÎñÆ÷¶ø²»±ØÌá½»Õû¸öÒ³Ãæ¡£AJAXµÄºËÐÄÊÇXMLHttpRequest¶ÔÏ󡣿ͻ§¶ËÄܹ»Ô
Ïà¹ØÎĵµ£º
ÈçÉÏͼËùʾΪAccordion¿Ø¼þ£º
¸Ð¾õ²»´íµÄÑùʽ
<style type="text/css">
.headerBg{cursor:hand;text-align:center;width:180px;height:21px;background-image:url(images/ajaxmenubg1.gif);FONT-SIZE: 12px;line-height:21px;} ......
¸Õ¿ªÊ¼Ñ§Ajax£¬¿´µ½ºÜ¶àÍøÉϵĴúÂ붼ÓÃGet·½·¨Ìá½»²ÎÊý£¬TomcatĬÈÏISO±àÂëʵÔÚÊÇÈÃÈËÍ·Í´£¬¶Ô¸¶ÂÒÂëÎÒ¶¼ÊÇÓùýÂËÆ÷×ö×Ö·û±àÂë¹ýÂ˵ģ¬Get·½·¨¹ýÂËÆ÷¼àÌý²»µ½£¬ËùÒÔÎÒһֱϲ»¶Ê¹ÓÃPost·½·¨£¬ÏÂÃæ¶ÔAjax GetºÍPost·½·¨×öÒ»¶Ô±È
GET£º
view plaincopy to clipboardprint?
<mce:script type="text/javascript"><!- ......
/*ÔÚÓÐÖÐÎIJÎÊýʱ,½ÓÊÕ·½ÐèҪʹÓÃUTF-8·½Ê½¶ÔÊý¾Ý½øÐнâÂë
*²»Ö§³Öpost¸½¼þ
*/
function getXmlHttpRequest() {
var xmlHttpRequest = null;
try {
xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} ......
ÔÚ¡¶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 respons ......
AJAX
ÊÇweb2.0
µÄ»ùʯ£¬ÏÖÔÚÍøÉÏÁ÷Ðм¸ÖÖ¿ªÔ´µÄAJAX¿ò¼Ü£¬±È
È磺jQuery,Mootools,Dojo,Ext JSµÈµÈ£¬ÄÇôÎÒÃǵ½µ×ÔÚʲôÇé¿öϸÃʹÓÃÄǸö¿ò¼Ü£¿ÒÔÏÂÊÇÒ»×éÕª³µÄÊý¾Ý£º
AjaxianÔÚ2007Äêµ×¶ÔAjax¹¤¾ß½øÐÐÁ˵÷²é£¬²¿·Öµ÷²é½á¹û¼ûÏÂ±í£¨ÆäÖÐÊý×ÖΪµ÷²éÕßʹÓøù¤¾ßµÄ°Ù·Ö±È£¬ÏêϸµÄÇë²Î¼ûÍøÒ³£©£ºhttp://ajaxian.com/archi ......