Ajax ²Ù×÷XMLµÄºÃʵÀý
¡¡¡¡ÔÚÉÏһƪÎÄÕÂÖУ¬ÎÒÃÇÌÖÂÛÁËÈçºÎͨ¹ýjavascript´ÓÒ»¸öÔ¶³ÌXMLÎļþÖÐÈ¡µÃÊý¾Ý¡£ÔÚÕâƪÎÄÕÂÖУ¬ÎÒÃǽ«Ñ§»áÔõÑù¶ÔÊý¾Ý×÷¸ü¸´ÔӵĴ¦Àí¡£×÷Ϊһ¸öʾÀý£¬ÎÒÃÇ»á×¼±¸Ò»×éXMLÊý¾Ý£¬½«Êý¾Ý·Ö¸î³É¶ÀÁ¢µÄƬ¶Ï²¢ÒÔ²»Í¬µÄ·½Ê½Õ¹Ê¾ÕâЩƬ¶Ï£¨È¡¾öÓÚËüÃÇÊÇÈçºÎ±»±êʶµÄ£©¡£
¡¡¡¡ÕâƪÎÄÕÂÊǽ¨Á¢ÔÚÉÏһƪÎÄÕÂÖй¹ÔìµÄʾÀý´úÂëµÄ»ù´¡Ö®ÉÏ£¬ËùÒÔÈç¹ûÄã²»ÄÜÀí½âÎÒÃÇÏÖÔڵĴúÂ룬Äã¿ÉÒԻعýÍ·È¥¶ÁµÚһƪÎÄÕ£¨sheneyan×¢£º¾ÍÔÚÉÏÃ棩¡£
¿ªÊ¼¡«
¡¡¡¡ÈÃÎÒÃÇ¿ªÊ¼ÎÒÃǵĵÚÒ»²½£º¹¹ÔìXML¡£ÎÒÃÇ×¼±¸Ð´Ò»¸öXMLÎĵµ£¬Ëü×éÖ¯ÁËһϵÁÐ×¼±¸ÈÃjavascript´¦ÀíµÄÊý¾Ý£¬ËùÒÔÎÒÃǽ«Ò»Æð×é֯һЩ½ÚµãºÍ×ӽڵ㣨»òÕߣ¬ÔªËغÍ×ÓÔªËØ£©¡£ÔÚÕâ¸öÀý×ÓÀÎÒÃǽ«Ê¹ÓÃһЩ¼ÒÍ¥³èÎïµÄÃû×Ö£º
<?xml version="1.0" encoding="UTF-8"?>
<data>
<pets>
<pet>è</pet>
<pet>¹·</pet>
<pet>Óã</pet>
</pets>
</data>
¡¡¡¡ÔÚÉÏÃ棬ÎÒÃÇÓÐÕâ¸öXMLÉùÃ÷£¨±êÃ÷Õâ¸öÎĵµÊÇÒ»¸öXML 1.0 Îĵµ£¬Ê¹ÓÃUTF-8±àÂ룩£¬Ò»¸ö¸ùÔªËØ£¨<data>£©½«ÏÂÃæËùÓеÄÔªËØ×éºÏÔÚÒ»Æð£¬Ò»¸ö<pets>ÔªËØ×éÖ¯ÁËËùÓеijèÎȻºóÒ»¸ö<pet>½Úµã¶ÔÓ¦Ò»Ö»³èÎΪÁËÖ¸¶¨Ã¿Ò»Ö»³èÎïÊÇʲôÀàÐ͵Ķ¯ÎÎÒÃÇÔÚ<pet>ÔªËØÖÐÉèÖÃÁËÎı¾½Úµã£ºÃ¨£¬¹·£¬Óã¡£
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="zh" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ʹÓÃAjax¿ª·¢WebÓ¦ÓóÌÐò - ʾÀý</title>
<script type="text/javascript"><!--
function ajaxRead(file){
var xmlObj = null;
if(window.XMLHttpRequest){
xmlObj = new XMLHttpRequest();
} else if(window.ActiveXObject){
xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
} else {
&
Ïà¹ØÎĵµ£º
ʲôÊÇ XML?
XML Ö¸¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¨EXtensible Markup Language£©
XML ÊÇÒ»ÖÖ±ê¼ÇÓïÑÔ£¬ºÜÀàËÆ HTML
XML µÄÉè¼Æ×ÚÖ¼ÊÇ´«ÊäÊý¾Ý£¬¶ø·ÇÏÔʾÊý¾Ý
XML ±êǩûÓб»Ô¤¶¨Òå¡£ÄúÐèÒª×ÔÐж¨Òå±êÇ©¡£
XML ±»Éè¼ÆΪ¾ßÓÐ×ÔÎÒÃèÊöÐÔ¡£
XML ÊÇ W3C µÄÍƼö±ê×¼
XML Óë HTML µÄÖ÷Òª²îÒì
XML ²»ÊÇ HTML µÄÌæ´ú¡£
XML ºÍ HTML Ϊ² ......
jQuery ÊÇʲô£¿
Çë·ÃÎÊ Ajax ¼¼Êõ×ÊÔ´ÖÐÐÄ£¬ÕâÊÇÓÐ¹Ø Ajax ±à³ÌÄ£ÐÍÐÅÏ¢µÄһվʽÖÐÐÄ£¬°üÀ¨ºÜ¶àÎĵµ¡¢½Ì³Ì¡¢ÂÛ̳¡¢blog¡¢wiki ºÍÐÂÎÅ¡£ÈκΠAjax µÄÐÂÐÅÏ¢¶¼ÄÜÔÚÕâÀïÕÒµ½¡£
jQuery ÓÉ John Resig ´´½¨ÓÚ 2006 Äê³õ£¬¶ÔÓÚÈκÎʹÓà JavaScript ´úÂëµÄ³ÌÐòÔ±À´Ëµ£¬ËüÊÇÒ»¸ö·Ç³£ÓÐÓÃµÄ JavaScript ¿â¡£ÎÞÂÛÄúÊǸոսӴ¥ Java ......
×¢Ò⣺$.get()ºÍ$.post()·½·¨ÊÇjQueryÖеÄÈ«¾Öº¯Êý¡£Ç°Ãæ½²µ½µÄload()·½Ê½ÊǶÔjQuery¶ÔÏó½øÐвÙ×÷µÄ¡£
1¡¢ $.get()·½·¨
¡¡¡¡$.get()·½·¨Ê¹ÓÃGET·½Ê½À´½øÐÐÒì²½ÇëÇó¡£
¡¡¡¡ËüµÄÓï·¨½á¹¹Îª£º
¡¡¡¡$.get( url [, data] [, callback] [, type] )
¡¡¡¡$.get()·½·¨²ÎÊý½âÊÍÈçÏÂ±í£º
²ÎÊýÃû³Æ
Àà¡¡ÐÍ
˵¡¡¡¡Ã÷
url
Strin ......
jQuery Ajax È«½âÎö
±¾ÎĶÌÖ·£ºhttp://s8.hk/0itq
±¾ÎĵØÖ·: jQuery Ajax È«½âÎö
±¾ÎÄ×÷ÕߣºQLeelulu
תÔØÇë±êÃ÷³ö´¦£¡
jQueryȷʵÊÇÒ»¸öͦºÃµÄÇáÁ¿¼¶µÄJS¿ò¼Ü£¬ÄÜ°ïÖúÎÒÃÇ¿ìËٵĿª·¢JSÓ¦Ó㬲¢ÔÚÒ»¶¨³Ì¶ÈÉϸıäÁËÎÒÃÇдJavaScript´úÂëµÄÏ°¹ß¡£
·Ï»°ÉÙ˵£¬Ö±½Ó½øÈëÕýÌ⣬ÎÒÃÇÏÈÀ´¿´Ò»Ð©¼òµ¥µÄ·½·¨£¬ÕâЩ·½·¨¶¼ÊǶÔjQu ......