检查userId可用性 [英] check userId availability

查看:86
本文介绍了检查userId可用性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Check UserId可用性而不刷新表单.
怎么才能解决这个问题.我可以使用ajax或任何其他程序.请提供该代码.我在Sql服务器数据库中使用了UserId字段,在我的网页中使用了一个文本框名称txtUserId.我想如果用户从文本框中离开,那么它会显示一条消息userId是否可用.

请帮忙..我做不到.

在此先感谢

I want to use Check UserId availability without refresh the form.
How can is solve this. Can i use ajax or any other procedure. Please providing the code for that. I used UserId field in the Sql server database and one textbox name txtUserId in my web page. I want if user leave from the textbox then it show a message userId is available or not.

Please help..i can''t do it.

Thanks in advance

推荐答案

所有您想知道的是如何从客户端(Javascript)与服务器进行通讯.

通过客户端(Javascript)与服务器端进行交互的方法很少:
1. XMLHttpRequest [回调 [ Web服务调用 [ PageMethod [
All you want is to know how to talk to server from client side (Javascript).

There are few ways to interact with server side through client side(Javascript):
1. XMLHttpRequest[^]
2. Callback[^]
3. WebService call[^]
4. PageMethod[^]


您必须为此使用ajax.
U可以使用文本框Onblur事件来调用javascript.
有关更多信息,请参见此链接

http://dotnetspidor.blogspot.com/2009/03/check-username-availability- using.html [ ^ ]
U have to use ajax for that.
U can use textbox Onblur event to call javascript.
For more info see this link

http://dotnetspidor.blogspot.com/2009/03/check-username-availability-using.html[^]


也请检查此
检查用户名可用性 [
also check this
Checking Username Availability[^]


这篇关于检查userId可用性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆