织梦CMS - 轻松建站从此开始!

WWW-36AB-COM【首页★新址】WWW-36AB-COM_日韩★WWW-36AB-COM

当前位置: 主页 > www-36ab-com > Javascript/Ajax >

innerHTML = 提示:用户名已被注册

时间:2012-11-28 13:00来源:网络整理 作者:管理员 点击:
HTML代码 %@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd html xmlns=http://www.w3.org/1999/xhtml head runat=s

; document.getElementById(PostButton), OnRequestComplete); return false; } //显示提示信息 function OnRequestComplete(result) { if(result == true) { document.getElementById(Message),请打消注释以下行 //InitializeComponent(); } [WebMethod] public string GetUser(string strUser) { string strMessage = null; if (strUser == ADMIN) { strMessage = true; } else { strMessage = false; } return strMessage; } } , HTML代码 %@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd html xmlns=http://www.w3.org/1999/xhtml head runat=server titleUntitled Page/title script type=text/javascript function GetUser() { requestSimpleService = WebServiceSample.GetUser(document.getElementById(UserName)。www-36ab-com

disabled = ; } } /script /head body form id=form1 runat=server asp:ScriptManager ID=ScriptManager1 runat=server Services asp:ServiceReference Path=WebServiceSample.asmx / /Services /asp:ScriptManager input id=UserName type=text onblur=return GetUser() / input id=PostButton type=button value=注 册 disabled=disabled /br / div id=Message/div /form /body /html WebService代码 using System; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Services.Protocols; using System.Web.Script.Services; /// summary /// WebServiceSample 的摘要说明 /// /summary [WebService(Namespace = http://tempuri.org/)] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ScriptService] public class WebServiceSample : System.Web.Services.WebService { public WebServiceSample () { //如果使用设计的组件,; document.getElementById(PostButton),innerHTML = 提示:用户名可以使用,disabled = disabled; } else { document.getElementById(Message),innerHTML = 提示:用户名已被注册,value。

(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
用户名: 验证码: 点击我更换图片
栏目列表
推荐内容