如何验证复选框和文本框字段 [英] how to validate both check box and textbox field

查看:112
本文介绍了如何验证复选框和文本框字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i创建了一个jsp页面..在它中我使用了复选框以及文本框..我需要检查复选框和文本框..我试过但是它正在验证只有复选框不是文本框..代码可以任何人帮助我...


login.jsp

展开 | 选择 | Wrap | 行号

解决方案

这是因为文本框没有checked属性,其被评估为 false 。 / blockquote>



i没有得到你的观点......我改变了e跟随javascript ..eventhough im not getting ...你能告诉在哪里修改以获得验证。

展开 | 选择 | 换行 | 行号


这次是不同的。作为demo做

展开 | 选择 | Wrap | 行号


hi,
i created one jsp page..in it i used check boxes as well as textboxes..i need to check both the check boxes and textboxes..i tried it but it is validating only the check box not the textbox..here is the code can anyone help me out...

login.jsp

Expand|Select|Wrap|Line Numbers

解决方案

that?s because text boxes do not have a checked property, which is evaluated as false.


hi,
i didnt get your point...i changed the following in javascript..eventhough i m not getting...can u tell where to modify to get validated.

Expand|Select|Wrap|Line Numbers


this time it’s different. as demo do

Expand|Select|Wrap|Line Numbers


这篇关于如何验证复选框和文本框字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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