Lets say you have two dropdown lists:
<select id="ddlMinExp">
<option value="0">Select Minimum Exp</option>
<option value="1">1</option>
......
.......
<option value="20">20</option>
</select>
And,
<select id="ddlMaxExp">
<option value="0">Select Maximum Exp</option>
<option value="1">1</option>
......
.......
<option value="25">25</option>
</select>
Then you can check the values through jQuery as -
$(function(){
$('#ddlMaxExp').change(function(){
var selectedMaxValue = Number($(this).val());
var selectedMinValue = Number($('#ddlMinExp').val());
if( selectedMaxValue > 0 && selectedMinValue > selectedMaxValue) {
alert('Minimum experience cannot be less than maximum experience');
$(this).find('option:first').attr('selected', 'selected');
}
else if( selectedMaxValue > 0 && selectedMinValue === 0) {
alert('Please select minimum experience first');
$(this).find('option:first').attr('selected', 'selected');
}
});
});
JSFiddle :
http://jsfiddle.net/c3UV3/[
^]
Hope this helps
Thanks