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

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 (){
     var params=$('input').serialize(); //ÐòÁл¯±íµ¥µÄÖµ
     $.ajax({
       url:'ajax_json.php', //ºǫ́´¦Àí³ÌÐò
       type:'post',         //Êý¾Ý·¢ËÍ·½Ê½
       dataType:'json',     //½ÓÊÜÊý¾Ý¸ñʽ
       data:params,         //Òª´«µÝµÄÊý¾Ý
       success:update_page //»Ø´«º¯Êý(ÕâÀïÊǺ¯ÊýÃû)
     });
   });
//$.post()·½Ê½£º
$('#test_post').click(function (){
    $.post(
      'ajax_json.php',
      {
        username:$('#input1').val(),
        age:$('#input2').val(),
        sex:$('#input3').val(),
        job:$('#input4').val()
      },
      function (data) //»Ø´«º¯Êý
      {
        var myjson='';
        eval('myjson=' + data + ';');
        $('#result').html("ÐÕÃû:" + myjson.username + "<br/>¹¤×÷:" + myjson['job']);
      }
    );
   });
//$.get()·½Ê½£º
$('#test_get').click(function ()
{
    $.get(
      'ajax_json.php',
     


Ïà¹ØÎĵµ£º

AjaxµÄÔ­ÀíºÍÓ¦ÓÃ

¹ØÓÚajaxµÄÃû×Ö
    ajax µÄÈ«³ÆÊÇAsynchronous JavaScript and XML£¬ÆäÖУ¬Asynchronous ÊÇÒì²½µÄÒâ˼£¬ËüÓбðÓÚ´«Í³web¿ª·¢ÖвÉÓõÄͬ²½µÄ·½Ê½¡£
¹ØÓÚͬ²½ºÍÒì²½
 
Òì²½´«ÊäÊÇÃæÏò×Ö·ûµÄ´«Ê䣬ËüµÄµ¥Î»ÊÇ×Ö·û£»¶øͬ²½´«ÊäÊÇÃæÏò±ÈÌصĴ«Ê䣬ËüµÄµ¥Î»ÊÇè壬Ëü´«ÊäµÄʱºòÒªÇó½ÓÊÜ·½ºÍ·¢ËÍ·½µÄʱÖÓÊ ......

DWR AJAX¸ü·½±ã

¸½springÕûºÏDWR(°üº¬struts1,spring,hibernateÕûºÏÖÃ):
http://blog.csdn.net/jiabeis/archive/2010/05/26/5626121.aspx
×î½üÁ˽âÁËÒ»¸öÓÐÓõÄAJAX¹¤¾ß£¬¿´ÁËÍøÉϵÄÎÄÕÂÕâÀïÓÐһЩժ³­ºÍ×Ô¼ºµÄ×ܽᣬºÍ´ó¼Ò·ÖÏí£º
ʲôÊÇDWR(Direct Web Remote)£¿
DWRÊÇÒ»ÖÖAJAX½â¾ö·½°¸£¡
DWR°üÀ¨Ò»¸öjava¿â£¬ÒÔ¼°Ò»Ì×javascript£¬Ê¹ ......

¹ØÓÚAJAXÒì²½£¨À´×ÔÍøÂ磩

Web 2.0 һƳ
ÔÚÉîÈëÑо¿´úÂë֮ǰÊ×ÏÈ¿´¿´×î½üµÄ¹Ûµã —— Ò»¶¨ÒªÊ®·ÖÇå³þ Web 2.0 Õâ¸ö¸ÅÄî¡£Ìýµ½ Web 2.0 Õâ¸ö´ÊµÄʱºò£¬Ó¦¸ÃÊ×ÏÈÎÊÒ»ÎÊ “Web 1.0 ÊÇʲô£¿” ËäÈ»ºÜÉÙÌýÈËÌáµ½ Web 1.0£¬Êµ¼ÊÉÏËüÖ¸µÄ¾ÍÊǾßÓÐÍêÈ«²»Í¬µÄÇëÇóºÍÏìӦģÐ͵Ĵ«Í³ Web¡£±ÈÈ磬µ½ Amazon.com ÍøÕ¾Éϵã»÷Ò»¸ö°´Å¥»òÕßÊäÈë ......

Ajax½éÉÜ XMLHttpRequest

Ajax½éÉÜ
AJAX - ä¯ÀÀÆ÷Ö§³Ö
AJAX µÄÒªµãÊÇ XMLHttpRequest ¶ÔÏó¡£²»Í¬µÄä¯ÀÀÆ÷´´½¨ XMLHttpRequest ¶ÔÏóµÄ·½·¨ÊÇÓвîÒìµÄ¡£IE ä¯ÀÀÆ÷ʹÓà ActiveXObject£¬¶øÆäËûµÄä¯ÀÀÆ÷ʹÓÃÃûΪ XMLHttpRequest µÄ JavaScript ÄÚ½¨¶ÔÏó¡£ÈçÐèÕë¶Ô²»Í¬µÄä¯ÀÀÆ÷À´´´½¨´Ë¶ÔÏó£¬ÎÒÃÇҪʹÓÃÒ»Ìõ "try and catch" Óï¾ä¡£
<script type="t ......

ajaxÓëjQuery·½·¨

ajax.asp
ÏÖÔÚʱ¼äÊÇ< %=Now()%>
ajax.html
<script type="text/javascript">
function Ajax(){
var xmlHttp=null;
if(window.ActiveXObject){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ