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

ʹÓÃjquery¼ò»¯ajax¿ª·¢

jQuery ÊÇʲô£¿
Çë·ÃÎÊ Ajax ¼¼Êõ×ÊÔ´ÖÐÐÄ£¬ÕâÊÇÓÐ¹Ø Ajax ±à³ÌÄ£ÐÍÐÅÏ¢µÄһվʽÖÐÐÄ£¬°üÀ¨ºÜ¶àÎĵµ¡¢½Ì³Ì¡¢ÂÛ̳¡¢blog¡¢wiki ºÍÐÂÎÅ¡£ÈκΠAjax µÄÐÂÐÅÏ¢¶¼ÄÜÔÚÕâÀïÕÒµ½¡£
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 ½Å±¾µ÷Óá£ÄúÖ»ÐèҪʹÓÃÒ»¸ö¼ò¶ÌµÄ×Ö·û´®¶ÔËùÐèµÄÔªËؽøÐж¨Òå¼´¿É¡£
Àí½âÕâÒ»´úÂëµÄ¹¤×÷Ô­Àí¿ÉÄÜ»áÓÐÒ»µã¸´ÔÓ¡£Ê×ÏÈ£¬ÎÒÃÇʹÓÃÁË $() º¯Êý —— jQuery Öй¦ÄÜ×îÇ¿´óµÄº¯Êý¡£Í¨³££¬ÎÒÃ


Ïà¹ØÎĵµ£º

ASP.NET AJAX ·þÎñÆ÷¶Ë±à³ÌѧϰС½á

    ×î½ü¿ªÊ¼ÁËASP.NET AJAXµÄÈ«Ãæѧϰ¡£ÔÚ·þÎñ¶Ë±à³ÌÕâ¿éÖ÷ÒªÓм¸¸ö·þÎñÆ÷¿Ø¼þ¸ºÔð£¬ËûÃÇ·Ö±ðΪ:ScriptManager,Timer,UpdatePanel,UpdateProgress.
     ÏÈÀ´ËµËµScriptManager.ËüÓиö·½·¨registerAsyncPostBackControl(¿Ø¼þ)£¬¿ÉÒÔ×¢²áÒ³ÃæÉϵÄÈκοؼþΪÒì²½´«ËÍ°´Å¥¡£»¹Óиö·½·¨½Ð ......

JQueryµÄajaxʵÀý

<html>
<head>
<title>jQuery Ajax ʵÀýÑÝʾ</title>
</head>
<script language="javascript" src="../lib/jquery.js"></script>
<script language="javascript">
$(document).ready(function ()
{
   $('#send_ajax').click(function (){
   ......

AJAX¼¼Êõ½éÉÜ

AJAX¼¼Êõ½éÉÜ
AJAX µÄÈ«³ÆÖ¸Òì²½µÄ JavaScript ¼° XML£¨Asynchronous JavaScript And XML£©
ÔÚѧϰAJAX֮ǰ£¬ÄãÐèÒªÁ˽âµÄ֪ʶÓУº
HTML / XHTML
JavaScript
µ±È»»¹ÓÐһЩÆäËûµÄ¼¼Êõ£ºCSS¡¢DOM¡¢XML¡¢XMLHttpRequest
AJAX ²»ÊÇÒ»ÖÖеıà³ÌÓïÑÔ£¬¶øÊÇÒ»ÖÖÓÃÓÚ´´½¨¸üºÃ¸ü¿ìÒÔ¼°½»»¥ÐÔ¸üÇ¿µÄ Web Ó¦ÓóÌÐòµÄ¼¼Êõ¡£
ͨ¹ ......

struts2+jquery+json+hibernate+ajaxµÄµÇ½demo

ÓÃstruts2+jquery+json+hibernate+ajax×öÁËÒ»¸öµÇ½µÄdemo¡£
1.jspÒ³Ãæ 
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/x ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ