ʹÓà jQuery ¼ò»¯ Ajax ¿ª·¢
jQuery ÊÇÒ»¸öJavaScript ¿â£¬ËüÓÐÖúÓÚ¼ò»¯ JavaScript™ ÒÔ¼° Asynchronous JavaScript + XML (Ajax) ±à³Ì¡£ÓëÀàËÆµÄ JavaScript ¿â²»Í¬£¬jQuery ¾ßÓжÀÌصĻù±¾ÔÀí£¬¿ÉÒÔ¼ò½àµØ±íʾ³£¼ûµÄ¸´ÔÓ´úÂ롣ѧϰ jQuery »ù±¾ÔÀí£¬Ì½Ë÷ÆäÌØÐԺ͹¦ÄÜ£¬Ö´ÐÐһЩ³£¼ûµÄ Ajax ÈÎÎñ²¢ÕÆÎÕÈçºÎʹÓòå¼þÀ©Õ¹ jQuery¡£
jQuery ÊÇʲô£¿
jQuery ÓÉ John Resig ´´½¨ÓÚ 2006 Äê³õ£¬¶ÔÓÚÈκÎʹÓà JavaScript ´úÂëµÄ³ÌÐòÔ±À´Ëµ£¬ËüÊÇÒ»¸ö·Ç³£ÓÐÓÃµÄ JavaScript ¿â¡£ÎÞÂÛÄúÊǸոսӴ¥ JavaScript ÓïÑÔ£¬²¢ÇÒÏ£Íû»ñµÃÒ»¸öÄܽâ¾öÎĵµ¶ÔÏóÄ£ÐÍ£¨Document Object Model£¬DOM£©½Å±¾ºÍ Ajax ¿ª·¢ÖÐһЩ¸´ÔÓÎÊÌâµÄ¿â£¬»¹ÊÇ×÷Ϊһ¸öÑá¾ëÁË DOM ½Å±¾ºÍ Ajax ¿ª·¢ÖÐÎÞÁĵÄÖظ´¹¤×÷µÄ×ÊÉî JavaScript ר¼Ò£¬jQuery ¶¼»áÊÇÄúµÄÊ×Ñ¡¡£
jQuery ÄÜ°ïÖúÄú±£Ö¤´úÂë¼ò½àÒ׶Á¡£ÄúÔÙÒ²²»±Ø±àд´ó¶ÑÖظ´µÄÑ»·´úÂëºÍ DOM ½Å±¾¿âµ÷ÓÃÁË¡£Ê¹Óà jQuery£¬Äú¿ÉÒÔ°ÑÎÕÎÊÌâµÄÒªµã£¬²¢Ê¹Óþ¡¿ÉÄÜ×îÉٵĴúÂëʵÏÖÄúÏëÒªµÄ¹¦ÄÜ¡£
ºÁÎÞÒÉÎÊ£¬jQuery µÄÔÀíÊǶÀÒ»ÎÞ¶þµÄ£ºËüµÄÄ¿µÄ¾ÍÊDZ£Ö¤´úÂë¼ò½à²¢¿ÉÖØÓᣵ±ÄúÀí½â²¢Ìå»áÕâÒ»ÔÀíºó£¬±ã¿ÉÒÔ¿ªÊ¼Ñ§Ï°±¾½Ì³ÌÁË£¬¿´¿´ jQuery ¶ÔÎÒÃǵıà³Ì·½Ê½ÓжàÉٸĽø°É¡£
һЩ¼òµ¥µÄ´úÂë¼ò»¯
ÏÂÃæÊÇÒ»¸ö¼òµ¥Ê¾Àý£¬Ëü˵Ã÷ÁË jQuery ¶Ô´úÂëµÄÓ°Ïì¡£ÒªÖ´ÐÐһЩÕæÕý¼òµ¥ºÍ³£¼ûµÄÈÎÎñ£¬±È·½ËµÎªÒ³ÃæµÄijһÇøÓòÖеÄÿ¸öÁ´½Ó¸½¼ÓÒ»¸öµ¥»÷£¨click£©Ê¼þ£¬Äú¿ÉÒÔʹÓô¿ JavaScript ´úÂëºÍ DOM ½Å±¾À´ÊµÏÖ£¬Èç Çåµ¥ 1 Ëùʾ¡£
Çåµ¥ 1. ûÓÐʹÓà jQuery µÄ DOM ½Å±¾
var external_links = document.getElementById('external_links');
var links = external_links.getElementsByTagName('a');
for (var i=0;i < links.length;i++) {
var link = links.item(i);
link.onclick = function() {
return confirm('You are going to visit: ' + this.href);
};
}
Çåµ¥ 2 ÏÔʾÁËʹÓà jQuery ʵÏÖµÄÏàͬµÄ¹¦ÄÜ¡£
Çåµ¥ 2. ʹÓÃÁË jQuery µÄ DOM ½Å±¾
$('#external_links a').click(function() {
return confirm('You are going to visit: ' + this.href);
});
ÊDz»ÊǺÜÉñÆ棿 ʹÓà jQuery£¬Äú¿ÉÒÔ°ÑÎÕÎÊÌâµÄÒªµã£¬Ö»ÈôúÂëʵÏÖÄúÏëÒªµÄ¹¦ÄÜ£¬¶øÊ¡È¥ÁËһЩ·±ËöµÄ¹ý³Ì¡£ÎÞÐè¶ÔÔªËؽøÐÐÑ»·£¬click() º¯Êý½«Íê³ÉÕâЩ²Ù×÷¡£Í¬ÑùÒ²²»ÐèÒª½øÐжà¸ö DOM ½Å±¾µ÷Óá£ÄúÖ»ÐèҪʹÓÃÒ»¸ö¼ò¶ÌµÄ×Ö·û´®¶ÔËùÐèµÄÔªËؽøÐж¨Òå¼´¿É¡£
Àí½âÕâÒ»´úÂëµÄ¹¤×
Ïà¹ØÎĵµ£º
http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
I was rather depressed over a year ago when Google deprecated their SOAP Search API with their AJAX Search API. Essentially Google was saying that they didn want anyone programmatically accessing Google search ......
ÏîÄ¿ÖÐÏëÓÃajax£¬ÓÚÊÇÔÚÍøÉÏ°ÇÁËn¶à×ÊÁÏ£¬·¸ÁËn¶à´íÎ󣬴ӽñÌìÉϰൽÏÖÔÚÒ»Ö±ÔÚ´¦ÀíÕâ¸öÎÊÌ⣬ÖÕÓÚ»¹ÊÇ°ÑËü½â¾öÁË¡£
µ±ÎÒ¿´µ½Ò³ÃæµÄajaxÏÔʾºó£¬ÎÒÐË·ÜÒì³££¬ÎªÁ˼Ǽ×Ô¼ºÑ§Ï°µÄajaxÀú³Ì£¬Ò²ÎªÁËÈøü¶àµÄÈËÉÙ×ßÍä·£¬ÌØд´ËÒ»ÎÄÒÔ¼ÇÖ®£¡
·Ï»°²»ËµÁË£¬ÎªÁ˸üºÃµÄÀí½â£¬ÎÒÖØ×öÁËÒ»¸öСµÄÏîÄ¿£¬ÒÔ¼ÓÉîÓ¡Ïó¡£ÏÖÔÚ¾ÍÒÔÕâ¸öСÏî ......
ÍøÒ³ÖгöÏÖ“'sys' 䶨Òå
”»ò“'Sys' is undefined”µÄ´íÎó¡£
´ËʱÎÒÃÇÒª×öµÄÊÇÔÚ web.config
ÖÐ <system.web> Ò»½ÚÏÂÃæÌí¼ÓÀàËÆ
ÈçÏÂÄÚÈÝ£º
<httpHandlers>
<add
verb="GET,HEAD" path="ScriptResource.a ......
xmlÊý¾Ý£º
writer.write("<root>" +
"<name>a</name>" +
"<name>b</name>"+
"</root>");
ǰ̨½âÎö£º
request.onreadystatechange=function(){
if(request.readyState==4){
var x=requ ......
¡¡¡¡ºÜ¶àÈ˶¼ÓùýAJAX¿Ø¼þ°É£¬AJAX¿Ø¼þ²»ÐèҪˢÐÂÒ³Ãæ¾Í¿ÉÒÔµ½ºǫ́ȥ¶Á³öÊý¾Ýµ½¿Í»§¶Ë£®AJAX¿Ø¼þ³ýÁËÓкÜìŵÄÌØЧÍ⣬ÆäÒª¹¦ÄܾÍÊDz»ÐèҪˢÐÂÕû¸öÒ³Ãæ¾Í¿ÉÒÔÈ¡µÃÓû§ËùÐèÒªµÄÊý¾Ý£¬ÎÒ°ÑÕâÒ»¿éµÄµÄ¹¦ÄÜ·â×°³ÉÒ»¸öÀ࣬·½±ãÈÕºó¿ÉÒÔÖظ´Ê¹Ó㬴úÂëÈçÏ£º
//Ajax Request Class Start
functio ......