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

ÊղصÄÒ»¸öjs ajax·â×°Àà

Õâ¸öÀàÕª×Ô£º ASP.NET AjaxµäÐÍÓ¦Óà һÊé
xmlhttp.js
function $() {
  var elements = new Array();
  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);
    if (arguments.length == 1)
      return element;
    elements.push(element);
  }
  return elements;
}
//------------------------------------------------------------------------------------------
//·â×°XMLHTTPµÄRequestÀàµÄ´úÂë
var Request = new Object();
//¶¨ÒåÒ»¸öXMLHTTPµÄÊý×é
Request.reqList = [];
//´´½¨Ò»¸öXMLHTTP¶ÔÏ󣬼æÈݲ»Í¬µÄä¯ÀÀÆ÷
function getAjax()
{
    var ajax=false;
    try
    {
     ajax = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e)
     {
      try
      {
      ajax = new ActiveXObject("Microsoft.XMLHTTP");
      }
     catch (E)
      {
      ajax = false;
      }
    }
    if (!ajax && typeof XMLHttpRequest!='undefined')
    {
     ajax = new XMLHttpRequest();
    }
    return ajax;
}
//·â×°XMLHTTPÏò·þÎñÆ÷·¢ËÍÇëÇóµÄ²Ù×÷
//url:Ïò·þÎñÆ÷ÇëÇóµÄ·¾¶£»method£ºÇëÇóµÄ·½·¨£¬¼´ÊÇGET»¹ÊÇPOST£»callback£ºµ±·þÎñÆ÷³É¹¦·µ»Ø½á¹ûʱ£¬µ÷Óõĺ¯Êý
//data£ºÏò·þÎñÆ÷ÇëÇóʱ¸½´øµÄÊý¾Ý£»urlencoded£ºurlÊÇ·ñ±àÂ룻callback2;µ±·þÎñÆ÷·µ»Ø´íÎóʱµ÷Óõĺ¯Êý
Request.send = function(url, method, callback, data, urlencoded, callback2)
 {
    var req=getAjax();  //


Ïà¹ØÎĵµ£º

JQueryÔËÓÃajax×¢²áÓû§ÊµÀý

//JS´úÂë
function checkname() {
    var Msg = document.getElementById("d_username");
    var chk = CheckN();
    if (chk) {
        $.ajax({ url: 'registerOK.aspx',
        & ......

ASP.NET ʾÀý AJAX Ó¦ÓóÌÐò


      ±¾½Ì³Ì´´½¨Ê¹Óà ASP.NET µÄ AJAX ¹¦ÄܵĻù±¾Ê¾ÀýÓ¦ÓóÌÐò¡£Äú¿ÉÒÔÁ˽⵽ÓÐ¹Ø ASP.NET µÄ AJAX ¹¦Äܵĸü¶àÐÅÏ¢£¬½«ÖªµÀÕâЩ¹¦ÄÜÖ¼ÔÚ½â¾öÄÄЩ¼¼ÊõÎÊÌ⣬ÒÔ¼°ÒÔϽéÉÜÐÔÎĵµ½«Éæ¼°ÄÄЩÖØÒªµÄ AJAX ×é¼þ£º
·ASP.NET AJAX Overview
·Ìí¼Ó AJAX ºÍ¿Í»§¶Ë¹¦ÄÜ
ÔÚ±¾½Ì³ÌÖУ¬Äú½« ......

Ajax¿çÓò·ÃÎÊ


AjaxÖ±½Ó¿çÓò·ÃÎÊ£¬»á³öÏÖûÓÐȨÏ޵ĴíÎó£¬Ò»¸ö±È½Ï¼òµ¥¿ÉÐеĽâ¾ö·½°¸ÈçÏ£º
×öÒ»¸ö ajaxÇëÇóµÄ ´úÀíservlet »òÕßjsp£¬
ajaxÇëÇóservlet»òjsp´úÀí£¬ÓÉservlet»òjsp´úÀíÈ¥ÇëÇóajaxÒª·ÃÎʵÄaction£¬È»ºóÔÙ½«actionµÄÏìÓ¦ÐÅÏ¢·µ»Ø¸øajax¼´¿É£¬
servlet»òjsp³äµ±ÖнéÈ˵ĽÇÉ«
servlet »ò jsp ´úÀíµÄ  ºËÐÄ´úÂëÈçÏ£ ......

jquery php ajax json

just get a json
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<mce:script src="jquery-1.3.2.min.js" mce_src="jq ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ