至少必须做出一个选择 - DropdownList [英] Atleast one selection must be made - DropdownList

查看:76
本文介绍了至少必须做出一个选择 - DropdownList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有四个下拉列表,我想验证(客户端验证)在表单有效提交之前选择了至少一个。我尝试过以下方法,但似乎无法正常工作。

I have four dropdownlist and i want to validate (client-side validation) that atleast one is selected before the form is valid for submission. I have tried the method below but it seems not working.

展开 | 选择 | Wrap | 行号

推荐答案

如何选择框你的页面看起来像? (HTML)
how does a selectbox in your page look like? (HTML)


使用我制作的模拟HTML,该函数对我来说非常合适。很可能你的表单的HTML是错误的。
The function works perfectly fine for me with the mock up HTML I made. Most likely your HTML for your form is wrong.
展开 | 选择 | Wrap | 行号


谢谢你们的帮助,但我很惊讶它没有不行。我的选择框如下所示,它是一个没有使用joomla验证的joomla前端页面。

thanks guys for your help, but i am surprised it doesn''t work. My selectbox looks like below, its a joomla frontend page without having used the joomla validation.

展开 | 选择 | Wrap | 行号


这篇关于至少必须做出一个选择 - DropdownList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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