验证单个Div中的多个文本框 [英] Validation Of Multiple TextBoxes In Single Div

查看:72
本文介绍了验证单个Div中的多个文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有6个接受数字和字符的文本框...我想通过单击一下按钮来验证它们....
例如

我的一个文本框是接受数字,因此它应该接受数字,另一个应接受字符....

我搜索了Google,但没有得到适当的答案..请让我知道解决方法...

谢谢.

I have 6 text boxes accepting numbers and characters...I want to validate them on single button click....
eg

One of my text box is accepting number so it should accept number and another should accept characters....

I searched Google but I am not getting appropriate answer.. please let me know the solution...

Thanks.

推荐答案

单击提交"按钮可以调用单个javascript函数.此函数应使用其ID获得六个文本框值中的每个,然后将验证逻辑应用于每个文本框.

我认为挺直截了当的.如果我正确理解了您的问题,请告诉我.
Call a single javascript function on the click of the submit button. This function should get each of the six textbox values using its id and then apply the validation logic to each of it.

Pretty straight forward I think. Please let me know if I understood your question properly.


这篇关于验证单个Div中的多个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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