AJAX ScriptManagerProxyµ÷ÓÃwebservice
ÄÚÈÝÒ³£º
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ScriptManagerProxyDemo.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
function EchoUserInput() {
var echoElem = $get("EnteredValue");
alert(echoElem);
ScriptManagerProxyDemo.WebService1.EchoInput(echoElem.value, OnSucceeded);
}
function OnSucceeded(result)
{
var RsltElem = $get("Results");
RsltElem.innerHTML=result;
}
</script>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<Services>
<asp:ServiceReference Path="~/WebService1.asmx" />
</Services>
</asp:ScriptManagerProxy>
<input type="text" id="EnteredValue" /><input type="button" onclick="EchoUserInput()"/>
<div id="Results"></div>
</asp:Content>
webservice£º
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace ScriptManagerProxyDemo
{
/// <summary>
/// WebService1 µÄժҪ˵Ã÷
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile
Ïà¹ØÎĵµ£º
×÷Õß:fbysss
msn:jameslastchina@hotmail.com
blog:blog.csdn.net/fbysss
ÉùÃ÷£º±¾ÎÄÓÉfbysssÔ´´£¬×ªÔØÇë×¢Ã÷³ö´¦
¹Ø¼ü×Ö£ºAjax¿çÓò
Ò».ÊÔÑé×¼±¸
ÐÞ¸Äc:/windows/system32/drivers/etc/hostsÎļþ£¬¼ÓÈë127.0.0.1 www.a.com www.b.com
Tomcat/webappsϽ¨Á¢crossdomai ......
11) ±íµ¥×ֶΰïÖúÐÅÏ¢µÄ×Ô¶¯Ìáʾ
ÔöÇ¿WEB±íµ¥µÄUsabilityÓкܶàºÜ¶àµÄ·½·¨£¬ÔÚÍøÉÏÒ»ËÑÒ»´óƬ£¬È»ºóÓÐЩʱºò£¬Óû§»á±»±íµ¥¸ãµÃºÜ»ìÂÒ£¬¶øÇÒ£¬²»Í¬µÄÓû§»á¶Ô±íµ¥Óв»Í¬µÄÀí½â£¬ÆäÊäÈëÒ²ÊÇǧÆæ°Ù¹Ö¡£ËùÒÔ£¬Îª±íµ¥×Ö¶ÎÔö¼ÓÒ»ÏÂ×Ô¶¯°ïÖúÐÅÏ¢µÄÌáʾ¾ø¶ÔÊǷdz£²»´íµÄÑ¡Ôñ¡£ÕâµãÔÚÌÔ±¦ÍøÉϱíÏֵñȽϳöÏÖ¡£ÏÂÃæÊÇÒ»¸ö·Ç³£¼òµ¥ ......
±¾ÀýÊDzÉÓÃJSP + Ajax + Îı¾À´ÑÝʾ¶àÑ¡¡¢È«Ñ¡£¬Ìí¼Ó¡¢É¾³ý¡¢¸üÐÂcheckbox¶àÑ¡¿òµÄЧ¹û£»³ä·ÖÕ¹ÏÖÁËÀûÓÃJavaScript¿ØÖÆHTML DOMÒÔ¼°ÀûÓÃXML http ´«µÝÊý¾Ý£¬ÀûÓÃJSP²Ù×÷Îı¾µÄЧ¹û¡£
¡¡¡¡1.JavaScript ÓÃÀ´¿ØÖÆÒ³ÃæÄÚÈݵÄÏÖʵÓëÔöɾЧ¹û£»
¡¡¡¡2.JSP×÷Ϊºǫ́£¬¶ÔÎı¾½øÐжÁÈ¡¡¢Ð´Èë¡¢¸üеȲÙ×÷£»
¡¡¡¡3.Îı¾¸ñʽÊÇÓÃÀ´´ ......
ÓкܾÃÒ»¶Îʱ¼äÎÒµÄBLOGÉÏûÓгöÏÖAJAXÏà¹ØѶϢÁË£¬Ö÷Òªµ±È»ÊÇÒòΪ¾ø´ó²¿·ÖµÄÖØÐĶ¼·Åµ½ÁËSilverlightÉíÉÏ(¿ÉÔ¤ÆÚµÄδÀ´Ó¦¸ÃÒ²»áÊÇÈç´Ë)¡£
µ«ÓÉÓÚ¹¤×÷ÉϵÄÐèÒª£¬×î½ü»¹ÊÇ»ØÍ·¿´ÁËһϼ´½«ÍƳöµÄASP.NET Ajax Library...£¬Ë³±ãÕÒÁËÒ»ÏÂÍøÂçÉϵÄѶϢ£¬¿´Õâ¸ö̬ÊÆÎÒ²ÂÏëÓ¦¸Ã²»ÉÙASP.NET¿ª·¢ÈËÔ±ºöÂÔµôÁËÕâ¸öÆäʵÒѾbet ......