如何使用javascript将asp文本框与asp中的数据库进行比较 [英] how do Compare Value textbox with database in asp using javascript

查看:97
本文介绍了如何使用javascript将asp文本框与asp中的数据库进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在asp中使用javascript比较Value文本框与数据库



输入值文本框并且不等于数据库中的值字段

消息值不等于

当点击输入

how do Compare Value textbox with database in asp using javascript

input value textbox and not equal with value field in database
Message value not equal
when click enter

推荐答案

因此你没有把你的代码片段,我也可以通过使用你的解决方案文本。 :)



就像这样。



第1步:输入你的文本框上的文本值



步骤2:之后对此进行必要的客户端验证(即空字符串等...)



步骤3:当您单击按钮时,根据您的文本值,使用 Ajax从数据库中获取数据。



第4步:如果您的ajax请求有任何值,那么数据库中有一条记录,你可以给一个给你的客户留言(例如已输入的数据或......)。



我希望这会对你有所帮助。
Hence you didn't put your code snippet,I can give your solution also as by using text. :)

It's like this.

Step 1: Enter your text value on your text box

Step 2 : After that do necessary client side validation on that (i.e empty string etc...)

Step 3 : When you click the button,according to your text value bring the data from the DB by using Ajax.

Step 4 : If your ajax request has any value then there is a record inside the DB and you can give a message to your client (e.g. Data already entered or ... ).

I hope this will help to you.


这篇关于如何使用javascript将asp文本框与asp中的数据库进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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