Jq level linkage determines whether the last select is selected or not when clicking on select.

jq cascading determines whether the last select is selected

when clicking on select.

the following code is not quite right. Ask for advice

<select name="" class="sel1">
    <option value="0"></option>
    <option value="1">1</option>
    <option value="2">2</option>
</select>
<select name="" class="sel2">
    <option value="0"></option>
    <option value="1">1</option>
    <option value="2">2</option>
</select>

$(function () {
       $(".sel2").click(function () {
             if($("-sharpsel1").attr("selected",false)){
                alert("");
            }
        })
    })
Feb.21,2022

$('select'). Siblings (). Is (' classname:checked')


:$(".sel1 option:selected").text()
:$(".sel1").find('option:selected').text()
:$(".sel1").val();
if(){
 alert("");
}
Menu