How to show error message after not selecting any value from dropdown?
<p>I am facing one problem. I want to show alert message after not selecting any value from dropdown box:-
<a href="https://i.stack.imgur.com/4kB0t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4kB0t.png" alt="enter image description here"></a></p>

<p>Here you see the image here opening hours will be shown When user not select any value from drop-down its OK user will be go proceed. If user select value from Monday First drop-down but not select any value from second drop-down and click on save and continue i want show alert message <strong>please select opening hours in correct way</strong>. and this is same for Tuesday and other days. Can anyone help me. </p>

<p>here is my html code:-</p>

<pre><code>enter code here
&lt;?php 
$from =array("6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"); 
 $days = array("Monday", "Tuesday", "Wednesday", "Thursday","Friday","Saturday","Sunday");  
 $to =array("7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22"); ?&gt; 
&lt;div class="col-md-12 col-sm-12 col-xs-12 fitness-time"&gt;
    &lt;div class="row"&gt;
        &lt;div class="additional"&gt;
            &lt;div class="form-group"&gt;
                &lt;span class="fitness-hours"&gt;
                    &lt;h4&gt;Opening Hours&lt;/h4&gt;
                &lt;/span&gt;
                &lt;div&gt;
                    &lt;div class="info_user_detail"&gt;
                        &lt;table class="table_info1 table-striped"&gt;
                            @foreach($days as $key=&gt; $alldays)
                            &lt;tr&gt;
                                &lt;td&gt;
                                    &lt;div class="checkbox no-margin"&gt;
                                        &lt;label&gt;
                                        &lt;input name="days[]" value="{{ $alldays }}"type="checkbox"&gt;{{ $alldays }}
                                        &lt;/label&gt;
                                    &lt;/div&gt;
                                &lt;/td&gt;
                                &lt;td&gt;
                                    &lt;div class="time-class"&gt;
                                        &lt;select name="from[]"class="select-class from"&gt;
                                            &lt;option value=""&gt;Select&lt;/option&gt;
                                            @foreach($from as $froms)
                                            &lt;option&gt;{{ $froms }}&lt;/option&gt;
                                            @endforeach
                                        &lt;/select&gt;
                                    &lt;/div&gt;
                                &lt;/td&gt;
                                &lt;td&gt;
                                    &lt;div class="time-class"&gt;
                                        &lt;select name="to[]"class="select-class to"&gt;
                                            &lt;option value=""&gt;Select&lt;/option&gt;
                                            @foreach($to as $to)
                                            &lt;option&gt;{{ $froms }}&lt;/option&gt;
                                            @endforeach
                                        &lt;/select&gt;
                                    &lt;/div&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                            @endforeach
                        &lt;/table&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="btn-save"&gt;
    &lt;button id="CheckImageCount" type="submit" class="btn btn-info"&gt;Save And Coutinue &lt;/button&gt;
&lt;/div&gt;
</code></pre>

<p>Jquery Code:-</p>

<pre><code>//enter code here
$('#CheckImageCount').on('click',function(){
        var value;
        $(".from").on('change',function(){
            value= $(this).val();
    });
    if(value != ""){
        var hoursvalue = $('.from').parents('td:first').next().find('.to').val();
        if(hoursvalue == ""){
            alert("PLease select opening hours in right way!"); return false;
        }else{
            alert("success"); return false;
        }
    }else{
        return true;
    }
});
</code></pre>

<p>Can anyone write JavaScript or jquery code to achieve this functionality. Thanks in advance :)</p>