问题描述
朋友们,我要求一个下拉列表值是最低经验1到20,第二个下拉列表是最大经验1到25.如何使用jquery验证两个下拉列表值。如果我选择第二个drowdownlist值减去我想要的第一个下拉列表值,使用jquery获取验证。以及如果我们选择第二个下拉列表不为空并且第一个下拉列表为空,那么获取验证消息和其他验证也可用于该下拉列表。
Hi friends , i have requirement on one dropdownlist values is minimum experience 1 to 20 and second dropdownlist is maximum experience 1 to 25. how to validates the two dropdownlist values using jquery. if i select the second drowdownlist values less the first dropdownlist values i want get the validition using jquery. as well as if we select the second dropdownlist is not empty and first dropdownlist is empty then getting the validation message and other validations also working on that dropdownlists.
推荐答案
<select id="ddlMinExp">
<option value="0">Select Minimum Exp</option>
<option value="1">1</option>
......
.......
<option value="20">20</option>
</select>
And,
And,
<select id="ddlMaxExp">
<option value="0">Select Maximum Exp</option>
<option value="1">1</option>
......
.......
<option value="25">25</option>
</select>
然后你可以通过jQuery检查值 -
Then you can check the values through jQuery as -
这篇关于如何使用jquery比较两个下拉列表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!