如何放置与选择选项值相关的条件

我正在编写一个读取下拉值然后执行一些操作的代码,我试图弄清楚如何获取选择选项值并为该值设置条件。

<script>
        var e = document.getElementById("selectNewBalance");
        var value = e.options[e.selectedIndex].value;
       if (value == "Inserted values"){

/// from here to the return statement I know for sure it works but now i'm trying to apply this condition only when the select option is  "Inserted values"
        var checkThisOnes = ["Value1", "Value2", "Value3"];
       var printThisOnes = []
       var message = "Please fill these fields: "
        $('#myform').submit(function() {
            var result=true;
            for (i = 0; i < checkThisOnes.length; i = i + 1) {
                var checkedValue = $('#'+checkThisOnes[i]).val();
                if (checkedValue === undefined || checkedValue === "") {
                    message = message + checkThisOnes[i]+ ", ";
                    result =false;
                }
            }
            if (result === false) {
            alert(message)
            location.reload();}
            return result;
        });}
</script>