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

AJAXµ÷ÓÃwebservice³ö´í

ÎÒÕÕ×ÅÍøÉÏ×öÁËÒ»¸ö³¬¼òµ¥µÄAJAXµ÷ÓÃWEBSERVICEµÄ·¶Àý,½á¹ûʧ°Ü,¸÷λ°ïæ¿´¿´Ê²Ã´Ô­Òò.

²Ù×÷²½ÖèÈçÏÂ:Ìí¼ÓÒ»¸öwsDemo.asmxµÄÐÂÏî,²úÉú2¸öÎļþ(wsDemo.asmxºÍwsDemo.cs)

ÔÚwsDemo.csÎļþÖÐʵÏÖ´úÂëÈçÏÂC# code:
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;

/// <summary>
/// wsDemo µÄժҪ˵Ã÷
/// </summary>

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class wsDemo : System.Web.Services.WebService
{
public wsDemo()
{
}

[WebMethod]
public string Welcome(string u)
{
string strMsg = "»¶Ó­[" + u + "]";
return strMsg;
}
}

ÔÚÒ³ÃæÎļþÖÐʵÏÖ´úÂë:

javascript²¿·ÖJScript code:
<script language =javascript type="text/javascript">
function OnbtOk_Click()
{
var userName = document.getElementById("iUserName").value;
var ws = wsDemo;
ws.Welecome(userName,ShowMsg);
return false;
}

function ShowMsg(result)
{
alert(result);
}
</script>




Ïà¹ØÎÊ´ð£º

´ó¼Ò¿´¿´ÎҵĴúÂëÓÐʲôÎÊÌ⣨¹ØÓÚajaxµÄ£©

ÔÚ¼ÒÑо¿ajax£¬¿´Á˱ðÈ˵ÄÒ»¸öÍøÉϹºÎïÉ̳ÇÏîÄ¿µÄÔ´´úÂ룬×Ô¼ºÒ²À´·Â±ðÈ˵Ķ«Î÷Á·Ï°Á·Ï°£¬Ã»Ïë³öÎÊÌâÁË£¡Ò»ÏµÄÕâЩ´úÂëÊÇÎÒ·ÂÕÕ±ðÈËдµÄ¡£ÎÒÊÇÏëÈÃ×¢²áµÄÈËÌîдÓû§Ãû£¬¹â±êÀ뿪Óû§ÃûºóÃæµÄÌîд¿Õ°×´¦ºóÁ¢¿ÌÀûÓÃaj ......

AjaxÓëSessionµÄÎÊÌâ - .NET¼¼Êõ / ASP.NET

֮ǰÓöµ½Ò»¸öÎÊÌâ¡£
ÓÚÊÇ×öÁËÒÔÏÂʵÑ飺
Ò³Ãæ¼ÓÔØºó£¬Ìá½»Ò»¸öAjaxÇëÇó(ÔݳÆÎªajax1)£¬ÇëÇóµÄÏß³ÌÔÚ·þÎñÆ÷Éϱ»Ë¯Ãß10ÃëÖÓ¡£
µã»÷Ò³ÃæÉÏÒ»¸öbutton£¬´¥·¢ÁíÒ»¸öAjaxÇëÇó(ajax2)¡£
µ±Ã»ÓÐʹÓÃsession£¬ÔÚ·þÎñÆ÷δ´ ......

Visual Web Developer 2008°²×°AJAXÎÊÌ⣡°ï°ïæ°¡£¡

Çë¸ç¸ç½ã½ãµÜµÜÃÃÃÃÊåÊå°¢ÒÌÃǰï°ïæ
ÎÒÓö¼ûÁËÒ»¸ö¸úÄúÒ»ÑùµÄÎÊÌ⣬¾ÍÊÇÎÒµÄ Visual Web Developer 2008 ¼òÌå°æ °²×°AJAXµÄʱºòÒ²³öÏÖÎÊÌ⣬ÎÒÏÂÔØAjaxControlToolkit
ÁËÒ²½âѹÁË£¬µ«ÊÇûÓа²×°AspAjaxExtSetu ......

Hibernate+spting+struts+ajax ÕûºÏÎÊÌâ

´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
......

ʲôʱºòä¯ÀÀÆ÷¾ß±¸ajax¹¦ÄܵÄ

ajaxË­¸ã³öÀ´µÄ¼¼Êõ°¡

µ½µ×Ôõô»ØÊ°¡£¬ÊÇ΢ÈíŪµÄÂ𣬻¹ÊÇgoogle °¡£¬»¹ÊÇÄĸöä¯ÀÀÆ÷¹«Ë¾°¡

The concept behind the XMLHttpRequest object was originally created by the developers of Outlook Web Ac ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ